diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-27 20:45:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-27 20:45:46 -0700 |
commit | 4ce716fe44a25c8cf391c91c755eaed2ea69c967 (patch) | |
tree | 17edc9662505e88f99f87f8ca0ce4b0aa640c6e6 /text_tests.lua | |
parent | 48162b981689c58e54ad44f45a9ba4b70a1c68d7 (diff) | |
download | lines.love-4ce716fe44a25c8cf391c91c755eaed2ea69c967.tar.gz |
line.y -> line_cache.starty in a few more places
Disquieting that none of my tests caught these. On the other hand, I also haven't noticed any issues in practice. Perhaps cache invalidation is often unnecessary.
Diffstat (limited to 'text_tests.lua')
-rw-r--r-- | text_tests.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/text_tests.lua b/text_tests.lua index 68e800a..9f0b0e9 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -831,7 +831,7 @@ function test_move_cursor_using_mouse() Editor_state.screen_top1 = {line=1, pos=1} Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} - edit.draw(Editor_state) -- populate line.y for each line in Editor_state.lines + edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) check_eq(Editor_state.cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line') check_eq(Editor_state.cursor1.pos, 2, 'F - test_move_cursor_using_mouse/cursor:pos') @@ -849,7 +849,7 @@ function test_select_text_using_mouse() Editor_state.screen_top1 = {line=1, pos=1} Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} - edit.draw(Editor_state) -- populate line.y for each line in Editor_state.lines + edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- press and hold on first location edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) -- drag and release somewhere else @@ -870,7 +870,7 @@ function test_select_text_using_mouse_and_shift() Editor_state.screen_top1 = {line=1, pos=1} Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} - edit.draw(Editor_state) -- populate line.y for each line in Editor_state.lines + edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- click on first location edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) @@ -896,7 +896,7 @@ function test_select_text_repeatedly_using_mouse_and_shift() Editor_state.screen_top1 = {line=1, pos=1} Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} - edit.draw(Editor_state) -- populate line.y for each line in Editor_state.lines + edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- click on first location edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) |