852b2cf1f1
remove 'undo' and 'redo' fields from app_type, because I won't be adding that functionality for the forseeable future
Humza Shahid2025-08-09 09:35:52 +01:00
58439d8df8
progress moving away from 'squares' field to layer tree
Humza Shahid2025-08-09 09:32:34 +01:00
34c29bcbba
add functions to add and remove pixels from layer-tree
Humza Shahid2025-08-09 09:13:03 +01:00
e634bb25d7
add grid module, and change some functions in layer-tree.sml to use it instead of having grid-logic in there
Humza Shahid2025-08-09 08:43:51 +01:00
6cd2b85d8b
change integer layer field when 'l' is pressed
Humza Shahid2025-08-09 08:36:14 +01:00
f1cd3fbf85
begin coding functionality to move squares
Humza Shahid2025-08-08 23:39:29 +01:00
28593486ed
refactor command-parsing code for normal mode, so that non-character events (KEY_ESC, RESIZE_EVENT, WITH_SEARCH_LIST) are dealt with at the beginning, and that the remainder of the parsing code looks at the current string and the new character typed. This is safe because pattern matching on the other commands (KEY_ESC, RESIZE_EVENT, WITH_SEARCH_LIST) always calls the same functions.
Humza Shahid2025-08-08 23:23:40 +01:00
3b8faf28e4
add d% motion for deleting a matching pair
Humza Shahid2025-08-08 07:30:39 +01:00
14f97ecc57
done refactoring normal mode functions
Humza Shahid2025-08-07 18:09:52 +01:00
f63e416e8f
move normal-mode deletion functions to their own file
Humza Shahid2025-08-07 18:02:47 +01:00
85c0b09d26
put cursor-movement functions in their own file
Humza Shahid2025-08-07 17:57:47 +01:00
bc188b9175
begin refactoring (split app-update into different files)
Humza Shahid2025-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
Humza Shahid2025-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)
Humza Shahid2025-08-07 15:28:29 +01:00
30036177fb
remove calls to retrieve 'lineIdx' values which are never used
Humza Shahid2025-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.)
Humza Shahid2025-08-07 14:40:14 +01:00
da2d2f1b55
add functionality to delete to/until prev match
Humza Shahid2025-08-07 13:37:03 +01:00
5d6dbb0403
add functions to move to prev/next match
Humza Shahid2025-08-07 13:22:10 +01:00
268fd47d7e
add functions to help find previous/next match in the search list
Humza Shahid2025-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
Humza Shahid2025-08-07 12:20:57 +01:00
0f5d6522cf
a bit of renaming, and add a blank background too
Humza Shahid2025-08-06 10:33:35 +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)
Humza Shahid2025-08-06 00:42:24 +01:00
3de64ba428
receive bug fixes in brolib/src/line_gap.sml
Humza Shahid2025-08-05 16:20:19 +01:00
fe8d3906de
fix regression introduced by previous commit (we need to be more careful when consing to 'leftStringsTl/rightStringsTl' than when consing to 'leftStrings/rightStrings', because our usage of consing the 'tl' variant in some places implies we have modified the head of that respective list
Humza Shahid2025-08-05 16:17:53 +01:00
a2ca88da92
fix bug in index metadata in line_gap.sml (make sure we add and subtract by size of string by calling String.size)
Humza Shahid2025-08-05 15:58:08 +01:00
0729662eef
minor formatting changes to exception logging, and begin building from new search list functionality as well
Humza Shahid2025-08-05 13:59:10 +01:00
01369627bf
begin reimplementing search list data structure
Humza Shahid2025-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)
Humza Shahid2025-08-04 12:57:22 +01:00
a4ac1b9ae0
add function for testing search-list.sml
Humza Shahid2025-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
Humza Shahid2025-08-04 11:11:18 +01:00
83634ef20e
log exceptions that occur to a local file
Humza Shahid2025-08-04 06:23:52 +01:00
528aea59a1
reimplement vi's '$' motion as a DFA, also eliminating a bug that involves double deleteion in the process
Humza Shahid2025-08-04 05:37:08 +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)
Humza Shahid2025-08-04 04:05:39 +01:00
aca8ba44b9
functorise some additional functions to reduce boilerplate
Humza Shahid2025-08-04 03:44:45 +01:00
cef8467ff6
begin functorising some char iterators which use if-expressions instead of DFAs
Humza Shahid2025-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)
Humza Shahid2025-08-03 17:35:33 +01:00
0f3b6a39fb
done functorising character iterators for vi word
Humza Shahid2025-08-03 17:13:26 +01:00
bf9e8be3b0
almost done functorising character iterators for vi word
Humza Shahid2025-08-03 17:10:15 +01:00
cd6ce4ffcc
begin functorins vi word char iterators
Humza Shahid2025-08-03 17:01:50 +01:00
e078ca89d2
refactor some code to use looping in DFA (which is faster than looping outside of the data structure)
Humza Shahid2025-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
Humza Shahid2025-08-03 13:41:11 +01:00
16fdfc7ac2
print stack trace for when an exception occurs
Humza Shahid2025-08-03 13:14:28 +01:00
1fe07149c7
fix bug im output of export string: previously had 'endXToNdc' and 'endYToNdc' functions (which sometimes produced incorrect/pixelated output), but it turns out that I was meant to use only 'xToNdc' and 'yToNdc' for correct output.
Humza Shahid2025-08-01 06:32:07 +01:00
2ee4501c6a
add separate whip sprite for last attack frame
Humza Shahid2025-07-31 19:12:36 +01:00
f36771f04d
add visible whip to attack sprites (except for last sprite which will use a separate whip sprite)
Humza Shahid2025-07-31 18:48:37 +01:00
0445595990
when generating collision string, map 'squares' vector to a new vector which treats all visible (non-transparent) colours the same. This allows us to ignore colour differences when generating the collision string, which is good because the colour of a pixel doesn't make a difference to collision detection.
Humza Shahid2025-07-30 07:27:55 +01:00
eedaf0450f
fix bugs with generating export strings from quad tree (have to add 1 to ex and ey indiscriminately, except if we are not in the canvas width/height dimensions)
Humza Shahid2025-07-29 15:55:38 +01:00
f74eb0fe58
add new dotscape sprites (standing and character movement during whip attack)
Humza Shahid2025-07-29 09:05:38 +01:00
a8ee1d5d37
a little refactoring to make implementation of word and WORD selection (viW, ciW, diW) easier
Humza Shahid2025-07-21 09:40:32 +01:00
51c9090adf
add a test for 'b' motion, checking that we move to start of prev word when on first character of next word
Humza Shahid2025-07-21 00:28:25 +01:00
2b060b99a0
add a 'MakeNextDfaLoopPlus1' functor to later use in forward word motions which ignore state of current character but start tracking state from next character. To be used in reimplementations of Vi's 'e' and 'E' commands.
Humza Shahid2025-07-20 13:52:23 +01:00
c6f4d1d8f3
reduce indentation level in MakeDfaLoop functors a bit, by performing 'strIdx = ...' calculation before we branch in case expression
Humza Shahid2025-07-20 13:48:14 +01:00
f57af737b9
further refactoring, functorising a function because it will later be used elsewhere as well
Humza Shahid2025-07-20 13:39:48 +01:00
554c3b0354
done refactoring 'startOfCurrentWORD' function, with tests still passing
Humza Shahid2025-07-20 13:28:40 +01:00
6b5a95ff45
reimplemented vi's 'B' command (although it needs a little refactoring)
Humza Shahid2025-07-20 13:09:21 +01:00