Commit Graph

227 Commits

Author SHA1 Message Date
5236579cd5 extract some more common code (which was used in many delete functions) into its own function 2025-08-07 19:31:34 +01:00
0fd63fe82f extract a function which has commonly used code 2025-08-07 19:17:47 +01:00
1bdf8e457b implement 'deleteInside' motions 2025-08-07 19:12:01 +01:00
b6960f4c68 implemented 'diw' and 'diW' commands for deleting inside a word or WORD 2025-08-07 18:33:03 +01:00
c6f40ba9a0 remove unnecessary linebreak 2025-08-07 18:12:27 +01:00
14f97ecc57 done refactoring normal mode functions 2025-08-07 18:09:52 +01:00
f63e416e8f move normal-mode deletion functions to their own file 2025-08-07 18:02:47 +01:00
85c0b09d26 put cursor-movement functions in their own file 2025-08-07 17:57:47 +01:00
bc188b9175 begin refactoring (split app-update into different files) 2025-08-07 17:41:10 +01:00
73affaa83a instead of clearing the search list when we delete, build a small part of it by searching through a small part that is likely to be visible on the user's screen, which gets rid of flickering effect and makes it look like the search list is not rebuilt from scratch 2025-08-07 15:37:32 +01:00
27c5d11dd7 code functions to build search list from a range in the buffer (not searching for every single match, but searching for visible matches on user's window) 2025-08-07 15:28:29 +01:00
30036177fb remove calls to retrieve 'lineIdx' values which are never used 2025-08-07 14:42:40 +01:00
752bb4d00f don't return (buffer, searchList) tuple when building search list, but only return search list itself. (No point returning buffer as it is never modified or moved.) 2025-08-07 14:40:14 +01:00
da2d2f1b55 add functionality to delete to/until prev match 2025-08-07 13:37:03 +01:00
5d6dbb0403 add functions to move to prev/next match 2025-08-07 13:22:10 +01:00
268fd47d7e add functions to help find previous/next match in the search list 2025-08-07 13:12:04 +01:00
704854c80f use concurrency for rebuilding search list after deletion so we don't block main thread on very, very large files 2025-08-07 12:20:57 +01:00
fab8cfcf20 change representation of search list to be a plain int vector and not a zipper (I am not using it for incremental purposes anyway so no point using a zipper) 2025-08-06 00:42:24 +01:00
e06a27d5ad delete some dead code 2025-08-06 00:30:50 +01:00
f0f28a1318 clean up some dead code 2025-08-06 00:16:50 +01:00
faa55abd3d remove some dead code 2025-08-05 23:58:54 +01:00
0729662eef minor formatting changes to exception logging, and begin building from new search list functionality as well 2025-08-05 13:59:10 +01:00
01369627bf begin reimplementing search list data structure 2025-08-05 13:24:55 +01:00
7dbd37a65b refactor text builder a bit (I should probably functorise buffer/lineGap iteration code out at some point) 2025-08-04 12:57:22 +01:00
a4ac1b9ae0 add function for testing search-list.sml 2025-08-04 12:08:35 +01:00
f2f93c5760 address bug in text-window.sml: if we want to call getStartLineAfter, then always pass in a positive number 2025-08-04 11:11:18 +01:00
229bf59f5d pass correct variable as argument ('startIdx' instead of 'cursorIdx') 2025-08-04 10:46:24 +01:00
ce0f700253 abstract exception handler/logger into its own file 2025-08-04 09:03:47 +01:00
f4c9039af1 fix failing unit test in search-list.sml/build-search-list.sml: perform bounds checking into array 2025-08-04 08:33:48 +01:00
528aea59a1 reimplement vi's '$' motion as a DFA, also eliminating a bug that involves double deleteion in the process 2025-08-04 05:37:08 +01:00
fe9dd0f034 progress functorising 2025-08-04 04:24:24 +01:00
895c286b4b additional functorisation progress 2025-08-04 04:14:17 +01:00
55e5778ff7 pass env argument in if-character-folder functor, to make it more generic (can access some environment data, which enables more reuse) 2025-08-04 04:05:39 +01:00
aca8ba44b9 functorise some additional functions to reduce boilerplate 2025-08-04 03:44:45 +01:00
cef8467ff6 begin functorising some char iterators which use if-expressions instead of DFAs 2025-08-04 03:23:27 +01:00
e55a7e2bca add separate folder when deleting end of current word, so that we can fix 'de' and 'dE' motions (the result of the folders for the cursor motion is meant to be decremented by 1, but the result for deleting is not meant to be decremented or incremented at all) 2025-08-03 17:35:33 +01:00
0f3b6a39fb done functorising character iterators for vi word 2025-08-03 17:13:26 +01:00
bf9e8be3b0 almost done functorising character iterators for vi word 2025-08-03 17:10:15 +01:00
cd6ce4ffcc begin functorins vi word char iterators 2025-08-03 17:01:50 +01:00
cf93d5885f remove unneeded function 2025-08-03 16:52:55 +01:00
cc276b5454 functorise character folders for vi WORD 2025-08-03 16:48:45 +01:00
b8a5df814e begin functorising some char-iteration functions 2025-08-03 16:34:31 +01:00
473ea8e35d functorise character folders to reduce repetitive boilerplate code (but have not functorised yet) 2025-08-03 16:21:36 +01:00
9662540889 remove a couple of unneded functions 2025-08-03 14:32:44 +01:00
ff9d61bba0 a bit of formatting 2025-08-03 14:18:17 +01:00
e078ca89d2 refactor some code to use looping in DFA (which is faster than looping outside of the data structure) 2025-08-03 14:17:25 +01:00
904526cd63 fix bug in building search list from range: if first index is less than 0, then start from 0, or else start from calculation 2025-08-03 13:41:11 +01:00
a8ee1d5d37 a little refactoring to make implementation of word and WORD selection (viW, ciW, diW) easier 2025-07-21 09:40:32 +01:00
af900057b0 delete dead code 2025-07-20 17:55:43 +01:00
d3e54d4102 reimplement vi's 'e' command 2025-07-20 17:48:45 +01:00