From d6220432848f3ad9e1276cc9ccfdba0b113adaf7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 19 May 2022 22:56:55 -0700 Subject: planning out cursor up/down over wrapped lines --- README.md | 6 +++--- 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 -- cgit 1.4.1-2-gfad0 main&id=09f2f3075a8be46484be2b5900888a8ac4799b75'>commit diff stats
path: root/baremetal/ex2.mu
blob: 1662fa840d9cf4ca12c6b6e394661758a18454fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31