diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-19 22:56:55 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-19 22:56:55 -0700 |
commit | d6220432848f3ad9e1276cc9ccfdba0b113adaf7 (patch) | |
tree | dd1ecb4c1479df6ca108a0ab82476878373101a8 | |
parent | a7c7fd6bce32256350cede6cea8c96ad6ecf1366 (diff) | |
download | lines.love-d6220432848f3ad9e1276cc9ccfdba0b113adaf7.tar.gz |
planning out cursor up/down over wrapped lines
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | text.lua | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md index 240b9a6..6325830 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Known issues: implications: * A long series of drawings will get silently skipped when you hit page-down, until a line of text can be showed on screen. - * If there's no line of text at the bottom of the file, one will be - created. - So far this app isn't really designed for all-drawing files. I'm really just + * If there's no line of text at the top of the file, you may not be able + to scroll back up to the top with page-up. + So far this app isn't really designed for drawing-heavy files. For now I'm targeting mostly-text files with a few drawings mixed in. diff --git a/text.lua b/text.lua index c14a60d..07931ea 100644 --- a/text.lua +++ b/text.lua @@ -213,6 +213,7 @@ function Text.keychord_pressed(chord) save_to_disk(Lines, Filename) elseif chord == 'up' then assert(Lines[Cursor_line].mode == 'text') + -- previous text line local new_cursor_line = Cursor_line while new_cursor_line > 1 do new_cursor_line = new_cursor_line-1 @@ -228,6 +229,7 @@ function Text.keychord_pressed(chord) end elseif chord == 'down' then assert(Lines[Cursor_line].mode == 'text') + -- next text line local new_cursor_line = Cursor_line while new_cursor_line < #Lines do new_cursor_line = new_cursor_line+1 |