Commit Graph

30 Commits

Author SHA1 Message Date
111e0cf66d remove usage of concurrent ml, deciding that we prefer to run everything in the main thread instead 2025-10-17 23:08:16 +01:00
5c8e74ac11 change type of SEARCH message to take a DFA, instead of a searchString 2025-10-08 05:54:19 +01:00
06106f5de8 remove 'searchString' field from app_type, because the same role is fulfilled by new 'dfa' field 2025-10-08 05:40:29 +01:00
8857f49537 pass DFA to 'SearchList.buildRange' function, so that we don't need to parse search string into DFA each time 2025-10-08 05:20:33 +01:00
fd8385fa81 add dfa field to app_type so that we don't rebuild DFA each time we want to execute a search again (like after deleting) 2025-10-08 05:02:15 +01:00
7f68084398 add 'caseSensitive' field to NORMAL_SEARCH_MODE, so that we know what kind of DFA to build 2025-10-08 04:53:04 +01:00
cc5c0bf95c implement escape sequences for regex 2025-10-06 21:44:57 +01:00
45fbd85183 move buffer around when calling 'SearchList.buildRange' 2025-09-30 05:40:57 +01:00
665497cf46 fix all remaining type errors 2025-09-29 15:06:33 +01:00
9b34014af1 a few bug fixes to NORMAL_SEARCH_MODE: the main one is that we were passing the general searchString to the resize function before, and we were drawing the wrong string because of that; another bug fix is that, on resizing, we have to update the mode to contain the recalculated searchScrollColumn 2025-09-14 10:28:42 +01:00
0632f7a969 add horizontal scrolling functionality to SearchBar 2025-09-14 10:07:43 +01:00
f1a06f946d add searchScrollColumn to NORMAL_SEARCH_MODE variant, and update and recalculate it where needed 2025-09-14 09:50:07 +01:00
668dd07699 pull in new version of brolib-sml so that we can get bug fixes for LineGap.getLineNumberOfIdx, delete the TextWindow structure (which was previously used to get the start line to draw from), and replace previous usages of TextWindow with TextScroll.getStartLine. This enables us to scroll in a way tailored to the reimplemented TextBuilder (which do not wrap lines or characters) 2025-09-13 05:12:17 +01:00
77a64ae794 previously forgot to draw char in text builder, but we do that now 2025-09-12 14:02:38 +01:00
299735f500 only update search list if timestamp for search message is greater than the buffer's modified time 2025-09-07 13:37:14 +01:00
f3c1905c0c when constructing SEARCH message, include time in the message as well. This will enable us to ignore any messages when we have a 'later' state available. 2025-09-07 13:24:41 +01:00
543453e8bd unescape an escaped search string 2025-09-01 13:56:32 +01:00
1296ce367b handle resize event and concurrent (permanent and full) search result in NORMAL_SEARCH_MODE 2025-09-01 12:52:26 +01:00
3e69c41d8f implement functionality for left and right arrow keys to move cursor left/right when entering searchString in NORMAL_SEARCH_MODE 2025-09-01 11:33:01 +01:00
ea4dae3c53 implement backspace for normal-search-mode 2025-09-01 03:34:16 +01:00
b80bc3d93c add searchCursorIdx field specific to NORMAL_SEARCH_MODE which we will later use to keep track of where to add/remove characters in the in-progress searchString from 2025-09-01 03:18:45 +01:00
71c77fc6ac redraw screen when we change from NORMAL_MODE to NORMAL_SEARCH_MODE, so it is visually clear that we have changed modes 2025-09-01 03:04:39 +01:00
f4a4dd9161 scaffolding for backspace functionality 2025-09-01 02:52:05 +01:00
3f7009bf09 prefix search string with a / in NORMAL_SEARCH_MODE, just like in Vim 2025-09-01 02:39:16 +01:00
0f945c9646 create an 'exitToNormalMode' function which exits NORMAL_SEARCH_MODE and creates a message to redraw the screen so that it looks like normal mode 2025-09-01 02:26:25 +01:00
561e45c556 extract reusable function which can be used when a search string is changed, in NORMAL_SEARCH_MODE 2025-09-01 02:18:23 +01:00
c95ae5eae3 add functionality to return from NORMAL_SEARCH_MODE back to NORMAL_MODE, saving new search string and new search list 2025-08-31 07:40:31 +01:00
a86befdea8 a bit of refactoring 2025-08-31 06:28:05 +01:00
542da2229c a little additional scaffolding for normal mode 2025-08-31 02:41:37 +01:00
3b6dff3081 begin scaffolding NormalSearchMode (normal mode, except we are searching) 2025-08-31 02:10:57 +01:00