about summary refs log tree commit diff stats
path: root/text_tests.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-27 20:45:46 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-27 20:45:46 -0700
commit4ce716fe44a25c8cf391c91c755eaed2ea69c967 (patch)
tree17edc9662505e88f99f87f8ca0ce4b0aa640c6e6 /text_tests.lua
parent48162b981689c58e54ad44f45a9ba4b70a1c68d7 (diff)
downloadlines.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.lua8
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)