|
|
a4dea7626f
|
add KEY_ESC message type, and refactor app-update.sml to use it (always calls 'clearMode' function which always sets the app to normal mode, and sets the command strnig to empty)
|
2024-11-08 09:30:57 +00:00 |
|
|
|
ff38e39deb
|
do not use 'clearMode' in helpDeleteChr function, because we have 'buffer' and 'cursorIdx' parameters we would like to add to the app state before exiting the loop. Instead, go to end of loop by passing 'count' of 0
|
2024-11-08 04:25:33 +00:00 |
|
|
|
36763fce94
|
add count to 'x' command, allowing [count] chars to be deleted
|
2024-11-08 04:21:05 +00:00 |
|
|
|
81c516e907
|
fix very minor issue in cursor.sml's 'helpViL' function (previously returned cursorIdx when non-line breaks is followed by non-line break, but now return cursorIdx + 1 instead which is the correct behaviour, because we want to move the cursor rightwards one position in that case
|
2024-11-07 21:07:11 +00:00 |
|
|
|
fdb6e0292a
|
fully done amending 'getCursorColumn' in cursor.sml it seems, because all the inputs I throw at it give the expected results
|
2024-11-07 21:00:56 +00:00 |
|
|
|
63f2945334
|
restore triple-line checking to 'startViK' in cursor.sml, as it seems safer
|
2024-11-07 20:51:02 +00:00 |
|
|
|
a77003e348
|
seem to have viK and viJ fixed for the moment, except when I delete from the first or second line with 'x' (deleting from other lines does not seem to make a difference)
|
2024-11-07 12:59:03 +00:00 |
|
|
|
a35c0803fb
|
fix 'getStartLineBefore' in text-window.sml, where we always decrement 'lineNum' variable when encountering \n, and use 'Int.max (lineNum - 1, 0)' to clip lineNum to 0 if it happens to go below 0
|
2024-11-07 11:57:32 +00:00 |
|
|
|
c07afee77f
|
simplify one part of cursor.sml's 'startViK' function, by calling 'helpVi0' rather than 'helpViK' when we know previous char is \n
|
2024-11-07 11:46:30 +00:00 |
|
|
|
9f0982ad91
|
simplify viK and especially startViK in cursor.sml, by only checking (strIdx - 1) and (strIdx - 2)
|
2024-11-06 19:47:14 +00:00 |
|
|
|
6b9cf8dbc2
|
amend problem with TextWindow.getStartLineBefore, where we were not following rule mentioned in previous commits to not count (graphical-chr -> \n) as line break
|
2024-11-06 12:46:53 +00:00 |
|
|
|
50d10c1a89
|
delete-chr (equivalent of vi's 'x' cmd) works fine now, except when deleting from the very first line, where first line may become invisible temporarily. I am not sure why that is happening but will find out.
|
2024-11-06 12:17:26 +00:00 |
|
|
|
2e13030efb
|
handle more edge cases of viK (and it is now complete)
|
2024-11-06 11:52:40 +00:00 |
|
|
|
62d62a8429
|
rewrite viK in accordance with previous commits
|
2024-11-05 21:42:56 +00:00 |
|
|
|
7f1e5249f0
|
rewrite Cursor.viJ and Cursor.helpViJ for new line break scheme
|
2024-11-05 20:25:08 +00:00 |
|
|
|
0315bd6550
|
rewrite Cursor.viH for new line-break-skip scheme, as mentioned in previous commit
|
2024-11-05 19:44:49 +00:00 |
|
|
|
9df6f92a33
|
progress with equivalent of vi's 'x' command
|
2024-11-05 12:38:01 +00:00 |
|
|
|
a0a8fcc17b
|
change line indexing in AppUpdate.moveToLine from 0-based to 1-based (so first line can be access with 1G, second with 2G, as is normal with Vim)
|
2024-11-04 02:56:57 +00:00 |
|
|
|
66d4346c74
|
improvement in Cursor.getLineStartIdx when going to last line in buffer
|
2024-11-04 02:46:02 +00:00 |
|
|
|
b368619df3
|
add functionality to go to specific line in buffer
|
2024-11-02 13:59:55 +00:00 |
|
|
|
2df8f88452
|
improvements to TextWindow.isCursorVisible (no need to do binary search; in fact, that leads to an exception, because we are meant to use Vector.sub to access the relative line instead)
|
2024-11-02 12:54:34 +00:00 |
|
|
|
2a8e02ff3a
|
when pressing fcore/text-window.sml to match pair, only recentre text window if matching pair is not currently visible on screen
|
2024-11-02 12:34:23 +00:00 |
|
|
|
f7b755d6a6
|
fix minor bug in cursor.sml (we checked if strPos is equal to 'String.size str - 1' but then accessed strPos + 1, which makes our bound check useless and may cause an exception. Instead, check 'strPos < String.size str - 1'
|
2024-11-01 03:35:12 +00:00 |
|
|
|
25f06b1f9a
|
fix minor bug in Cursor.matchPair fuunction; depending on chr at strIdx, we might want to iterate on the leftStrings or on the rightStrings. Before, we iterated on the rightStrings only, but now we iterate on whichever is appropriate
|
2024-10-31 11:50:18 +00:00 |
|
|
|
fe317ca220
|
add missing implementation of Cursor.matchPair when strIdx is in tl
|
2024-10-31 11:19:10 +00:00 |
|
|
|
553d4605e7
|
add implementation of matching cursor pairs
|
2024-10-31 11:07:52 +00:00 |
|
|
|
1316cdfe13
|
fill in todo where strIdx is in tl, in text-window.sml function 'getStartLineWithCursorCentered
|
2024-10-30 11:12:12 +00:00 |
|
|
|
601a341992
|
add functionality to move to end of line
|
2024-10-30 10:54:55 +00:00 |
|
|
|
308d042deb
|
add functionality to centre text window to cursor
|
2024-10-30 10:05:16 +00:00 |
|
|
|
f2f305c35d
|
add command to go to start of lineGap
|
2024-10-30 07:51:24 +00:00 |
|
|
|
c7570707ab
|
100fcore/app-update.sml done with functionality of getting screen to move (if needed) when cursor moves, including getting screen to move when moving to a new chr (in this commit)
|
2024-10-28 23:06:32 +00:00 |
|
|
|
5e1e39ca69
|
fixed two issues. First is that an exception occurred when sometimes moving cursor forwards. Cause of this issue was that callee functions depended on LineGap being moved to start of line, but this did not always happen (and now it does always happen). Second issue was that moving cursor down did not scroll as expected when line wrapped. The reason for this second issue was that the 'getStartLineAfter' function did not increment 'startLine' value in loop when line wrap occurred. Both issues are now fixed.
|
2024-10-28 22:54:28 +00:00 |
|
|
|
bff4c006ed
|
have functionality for cursor to scroll down a line when cursor moves down one line working, but it only seems to work perfectly when there are no visual line breaks
|
2024-10-28 21:56:07 +00:00 |
|
|
|
0ed5a23ade
|
some progress moving textWindow, but it is not perfect yet
|
2024-10-28 10:59:18 +00:00 |
|
|
|
4b1ee33954
|
begin moving text window when cursor goes off screen (currently, we only move the window when cursor goes backwards but this works fine and as expected)
|
2024-10-28 09:34:55 +00:00 |
|
|
|
deab30c46d
|
add equivalent of vi's 'ge' and 'gE' commands
|
2024-10-28 06:52:58 +00:00 |
|
|
|
22f7c7f8c3
|
return nonLastLine from helpTillPrevChr function
|
2024-10-27 02:45:15 +00:00 |
|
|
|
44af1441cf
|
add equivalent functionality of vi's 'T' command
|
2024-10-26 22:11:52 +01:00 |
|
|
|
8ef0365e20
|
a little refactoring
|
2024-10-26 21:56:11 +01:00 |
|
|
|
22ca7c5ed4
|
add equivalent of vi's 'F'
|
2024-10-26 21:21:33 +01:00 |
|
|
|
01213fb2fb
|
fix bug with tillNextChr which would place cursor on a newline
|
2024-10-26 16:20:24 +01:00 |
|
|
|
eeacde8e7a
|
address edge case when '0' is input, because '0' may either be a count if some number preceded it, or else it is a command to go the start of the line
|
2024-10-26 11:04:04 +01:00 |
|
|
|
62a9aaaaab
|
progress with moving cursor to specific char (vi's 't' command and vi's 'f' command)
|
2024-10-26 10:47:45 +01:00 |
|
|
|
816f064558
|
progress parsing normal mode commands
|
2024-10-26 06:01:48 +01:00 |
|
|
|
defb17af20
|
add mode type to app type (equivalent of vi's normal mode, visual mode, insert mode, etc.)
|
2024-10-26 04:46:05 +01:00 |
|
|
|
17a69720fd
|
add function to go to first non-space character in line
|
2024-10-25 21:44:46 +01:00 |
|
|
|
7a62ad3afc
|
pass higher order function to word motions, for less code duplication
|
2024-10-25 21:27:58 +01:00 |
|
|
|
39e867bd35
|
reduce code duplication in app-update.sml by using higher order function
|
2024-10-25 21:10:53 +01:00 |
|
|
|
a198840961
|
add WORD motions (as opposed to word motions)
|
2024-10-25 21:01:48 +01:00 |
|
|
|
b79a8696f5
|
refactor many functions in cursor.sml so they don't need to be mutually recursive
|
2024-10-25 15:25:39 +01:00 |
|