about summary refs log tree commit diff stats
path: root/text_tests.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-06-11 10:37:58 -0700
committerKartik K. Agaram <vc@akkartik.com>2024-06-11 10:37:58 -0700
commit69c88da98ca1bba3ab1c890639aa0228f125c467 (patch)
treeed5d0a06eeeb97d205a905efe73bd8730e79cd32 /text_tests.lua
parentf2299cb422d0fc07a1b01f0c31f88e9ae5ab168f (diff)
downloadlines.love-69c88da98ca1bba3ab1c890639aa0228f125c467.tar.gz
stop caching starty
This is quite useful because I used to have a long list of places in
which to invalidate the cache.
Diffstat (limited to 'text_tests.lua')
-rw-r--r--text_tests.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/text_tests.lua b/text_tests.lua
index 40320b1..9e42088 100644
--- a/text_tests.lua
+++ b/text_tests.lua
@@ -255,7 +255,7 @@ function test_click_moves_cursor()
   Editor_state.cursor1 = {line=1, pos=1}
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.selection1 = {}
-  edit.draw(Editor_state)  -- populate line_cache.starty for each line Editor_state.line_cache
+  edit.draw(Editor_state)  -- populate line_cache.startpos 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, 'cursor:line')
   check_eq(Editor_state.cursor1.pos, 2, 'cursor:pos')
@@ -812,7 +812,7 @@ function test_select_text_using_mouse()
   Editor_state.cursor1 = {line=1, pos=1}
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.selection1 = {}
-  edit.draw(Editor_state)  -- populate line_cache.starty for each line Editor_state.line_cache
+  edit.draw(Editor_state)  -- populate line_cache.startpos 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
@@ -831,7 +831,7 @@ function test_select_text_using_mouse_starting_above_text()
   Editor_state.cursor1 = {line=1, pos=1}
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.selection1 = {}
-  edit.draw(Editor_state)  -- populate line_cache.starty for each line Editor_state.line_cache
+  edit.draw(Editor_state)  -- populate line_cache.startpos for each line
   -- press mouse above first line of text
   edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)
   check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
@@ -890,7 +890,7 @@ function test_select_text_using_mouse_and_shift()
   Editor_state.cursor1 = {line=1, pos=1}
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.selection1 = {}
-  edit.draw(Editor_state)  -- populate line_cache.starty for each line Editor_state.line_cache
+  edit.draw(Editor_state)  -- populate line_cache.startpos for each line
   -- 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)
@@ -914,7 +914,7 @@ function test_select_text_repeatedly_using_mouse_and_shift()
   Editor_state.cursor1 = {line=1, pos=1}
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.selection1 = {}
-  edit.draw(Editor_state)  -- populate line_cache.starty for each line Editor_state.line_cache
+  edit.draw(Editor_state)  -- populate line_cache.startpos for each line
   -- 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)