about summary refs log tree commit diff stats
path: root/source_text_tests.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-12-06 13:56:36 -0800
committerKartik K. Agaram <vc@akkartik.com>2024-12-06 13:56:36 -0800
commit97aa8b77e631ab6b33a7c46d448634d3fafb49fd (patch)
tree396e51aa600ba3e5a28ea0b89c62105d97ae9b15 /source_text_tests.lua
parentbbec6cdb4eae672d306fc19daa29210e52589fbc (diff)
parent40ac3dd75b43489f3796dce7679283d552347067 (diff)
downloadview.love-97aa8b77e631ab6b33a7c46d448634d3fafb49fd.tar.gz
Merge text.love HEAD main
Diffstat (limited to 'source_text_tests.lua')
-rw-r--r--source_text_tests.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/source_text_tests.lua b/source_text_tests.lua
index 7ed4caa..12fb9c6 100644
--- a/source_text_tests.lua
+++ b/source_text_tests.lua
@@ -319,7 +319,7 @@ function test_click_on_empty_line()
   check_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits')
 end
 
-function test_click_below_all_lines()
+function test_click_below_final_line_of_file()
   -- display one line
   App.screen.init{width=50, height=80}
   Editor_state = edit.initialize_test_state()
@@ -331,8 +331,9 @@ function test_click_below_all_lines()
   -- click below first line
   edit.draw(Editor_state)
   edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+50, 1)
-  -- cursor doesn't move
-  check_eq(Editor_state.cursor1.line, 1, 'cursor')
+  -- cursor goes to bottom
+  check_eq(Editor_state.cursor1.line, 1, 'cursor:line')
+  check_eq(Editor_state.cursor1.pos, 4, 'cursor:pos')
   -- selection remains empty
   check_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits')
 end