diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-01-31 22:39:04 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-01-31 22:39:04 -0800 |
commit | 33ad6b7e5b5436d9b3e2ddd7119052bf3af5f02f (patch) | |
tree | 8c1744a0346834bc9d86761df3a49ee5c65a3552 /source_text.lua | |
parent | 266de35f87161f841c26ab18a044cdf0a02682ad (diff) | |
download | lines.love-33ad6b7e5b5436d9b3e2ddd7119052bf3af5f02f.tar.gz |
bugfix: up arrow when line above is a drawing
This bug was introduced in commit 528c64d690 on 2022-09-05 :/
Diffstat (limited to 'source_text.lua')
-rw-r--r-- | source_text.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source_text.lua b/source_text.lua index 71f4f7b..7c00191 100644 --- a/source_text.lua +++ b/source_text.lua @@ -680,7 +680,7 @@ function Text.upA(State) new_cursor_line = new_cursor_line-1 if State.lines[new_cursor_line].mode == 'text' then --? print('found previous text line') - State.cursor1 = {line=State.cursor1.line-1, pos=nil} + State.cursor1 = {line=new_cursor_line, pos=nil} Text.populate_screen_line_starting_pos(State, State.cursor1.line) -- previous text line found, pick its final screen line --? print('has multiple screen lines') @@ -719,7 +719,7 @@ function Text.upB(State) while new_cursor_line > 1 do new_cursor_line = new_cursor_line-1 if State.lines[new_cursor_line].mode == 'text' then - State.cursor1 = {line=State.cursor1.line-1, posB=nil} + State.cursor1 = {line=new_cursor_line, posB=nil} Text.populate_screen_line_starting_pos(State, State.cursor1.line) local prev_line_cache = State.line_cache[State.cursor1.line] local prev_screen_line_starting_pos = prev_line_cache.screen_line_starting_pos[#prev_line_cache.screen_line_starting_pos] |