diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-10-29 16:04:14 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-10-29 16:04:14 -0700 |
commit | 1693f1f160e0567cf0bf1f26d3d61f577082cdfb (patch) | |
tree | 5fadc16bed61ceccbbda889840f1b43cefb20f07 /text_tests.lua | |
parent | c1a3616964bfdeb11144c0e7289fc16ba563e84a (diff) | |
download | view.love-1693f1f160e0567cf0bf1f26d3d61f577082cdfb.tar.gz |
bugfix #2 in search UI
Diffstat (limited to 'text_tests.lua')
-rw-r--r-- | text_tests.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/text_tests.lua b/text_tests.lua index aebade8..7168daf 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -2087,3 +2087,17 @@ function test_search_downwards_from_end_of_line() edit.run_after_keychord(Editor_state, 'down', 'down') -- no crash end + +function test_search_downwards_from_final_pos_of_line() + App.screen.init{width=120, height=60} + Editor_state = edit.initialize_test_state() + Editor_state.lines = load_array{'abc', 'def', 'ghi'} + Text.redraw_all(Editor_state) + Editor_state.cursor1 = {line=1, pos=3} + Editor_state.screen_top1 = {line=1, pos=1} + edit.draw(Editor_state) + -- search for empty string + edit.run_after_keychord(Editor_state, 'C-f', 'f') + edit.run_after_keychord(Editor_state, 'down', 'down') + -- no crash +end |