diff options
Diffstat (limited to 'source_text_tests.lua')
-rw-r--r-- | source_text_tests.lua | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/source_text_tests.lua b/source_text_tests.lua index b8f29d1..c17842a 100644 --- a/source_text_tests.lua +++ b/source_text_tests.lua @@ -75,7 +75,6 @@ function test_press_ctrl() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.run_after_keychord(Editor_state, 'C-m', 'm') end @@ -255,7 +254,6 @@ function test_click_moves_cursor() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} 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) @@ -274,7 +272,6 @@ function test_click_to_left_of_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=3} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} -- click to the left of the line edit.draw(Editor_state) @@ -294,7 +291,6 @@ function test_click_takes_margins_into_account() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} -- click on the other line edit.draw(Editor_state) @@ -313,7 +309,6 @@ function test_click_on_empty_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} -- click on the empty line edit.draw(Editor_state) @@ -332,7 +327,6 @@ function test_click_below_all_lines() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} -- click below first line edit.draw(Editor_state) @@ -350,7 +344,6 @@ function test_draw_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'screen:1') @@ -367,7 +360,6 @@ function test_draw_wrapping_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'screen:1') @@ -384,7 +376,6 @@ function test_draw_word_wrapping_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc ', 'screen:1') @@ -402,7 +393,6 @@ function test_click_on_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=20} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- click on the other line edit.draw(Editor_state) edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) @@ -421,7 +411,6 @@ function test_click_on_wrapping_line_takes_margins_into_account() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=20} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- click on the other line edit.draw(Editor_state) edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) @@ -439,7 +428,6 @@ function test_draw_text_wrapping_within_word() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abcd ', 'screen:1') @@ -457,7 +445,6 @@ function test_draw_wrapping_text_containing_non_ascii() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'mad', 'screen:1') @@ -476,7 +463,6 @@ function test_click_past_end_of_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'madam ', 'baseline/screen:1') @@ -499,7 +485,6 @@ function test_click_on_wrapping_line_rendered_from_partway_at_top_of_screen() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=8} Editor_state.screen_top1 = {line=1, pos=7} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, "I'm ad", 'baseline/screen:2') @@ -520,7 +505,6 @@ function test_click_past_end_of_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'madam ', 'baseline/screen:1') @@ -544,7 +528,6 @@ function test_click_past_end_of_wrapping_line_containing_non_ascii() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'madam ', 'baseline/screen:1') @@ -569,7 +552,6 @@ function test_click_past_end_of_word_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'the quick brown fox ', 'baseline/screen:1') @@ -588,7 +570,6 @@ function test_select_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- select a letter App.fake_key_press('lshift') @@ -611,7 +592,6 @@ function test_cursor_movement_without_shift_resets_selection() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- press an arrow key without shift edit.run_after_keychord(Editor_state, 'right', 'right') @@ -629,7 +609,6 @@ function test_edit_deletes_selection() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- press a key edit.run_after_text_input(Editor_state, 'x') @@ -646,7 +625,6 @@ function test_edit_with_shift_key_deletes_selection() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- mimic precise keypresses for a capital letter App.fake_key_press('lshift') @@ -668,7 +646,6 @@ function test_copy_does_not_reset_selection() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- copy selection edit.run_after_keychord(Editor_state, 'C-c', 'c') @@ -686,7 +663,6 @@ function test_cut() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- press a key edit.run_after_keychord(Editor_state, 'C-x', 'x') @@ -704,7 +680,6 @@ function test_paste_replaces_selection() Editor_state.cursor1 = {line=2, pos=1} Editor_state.selection1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- set clipboard App.clipboard = 'xyz' @@ -723,7 +698,6 @@ function test_deleting_selection_may_scroll() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=2} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'def', 'baseline/screen:1') @@ -747,7 +721,6 @@ function test_edit_wrapping_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=4} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) edit.run_after_text_input(Editor_state, 'g') local y = Editor_state.top @@ -766,7 +739,6 @@ function test_insert_newline() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -795,7 +767,6 @@ function test_insert_newline_at_start_of_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- hitting the enter key splits the line edit.run_after_keychord(Editor_state, 'return', 'return') check_eq(Editor_state.cursor1.line, 2, 'cursor:line') @@ -812,7 +783,6 @@ function test_insert_from_clipboard() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -841,7 +811,6 @@ function test_select_text_using_mouse() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- press and hold on first location @@ -861,7 +830,6 @@ function test_select_text_using_mouse_starting_above_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- press mouse above first line of text @@ -879,7 +847,6 @@ function test_select_text_using_mouse_starting_above_text_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=5} Editor_state.screen_top1 = {line=2, pos=3} - Editor_state.screen_bottom1 = {} -- press mouse above first line of text edit.draw(Editor_state) edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1) @@ -902,7 +869,6 @@ function test_select_text_using_mouse_starting_below_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'ab', 'baseline:screen:1') @@ -923,7 +889,6 @@ function test_select_text_using_mouse_and_shift() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- click on first location @@ -948,7 +913,6 @@ function test_select_text_repeatedly_using_mouse_and_shift() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache -- click on first location @@ -978,7 +942,6 @@ function test_select_all_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- select all App.fake_key_press('lctrl') @@ -1000,7 +963,6 @@ function test_cut_without_selection() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} Editor_state.selection1 = {} edit.draw(Editor_state) -- try to cut without selecting text @@ -1016,7 +978,6 @@ function test_pagedown() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- initially the first two lines are displayed edit.draw(Editor_state) local y = Editor_state.top @@ -1046,7 +1007,6 @@ function test_pagedown_skips_drawings() check_eq(Editor_state.lines[2].mode, 'drawing', 'baseline/lines') Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} local drawing_height = Drawing_padding_height + drawing_width/2 -- default -- initially the screen displays the first line and the drawing -- 15px margin + 15px line1 + 10px margin + 25px drawing + 10px margin = 75px < screen height 80px @@ -1070,7 +1030,6 @@ function test_pagedown_can_start_from_middle_of_long_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc ', 'baseline/screen:1') @@ -1105,7 +1064,6 @@ function test_pagedown_never_moves_up() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=9} Editor_state.screen_top1 = {line=1, pos=9} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- pagedown makes no change edit.run_after_keychord(Editor_state, 'pagedown', 'pagedown') @@ -1120,7 +1078,6 @@ function test_down_arrow_moves_cursor() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- initially the first three lines are displayed edit.draw(Editor_state) local y = Editor_state.top @@ -1153,7 +1110,6 @@ function test_down_arrow_skips_drawing() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1175,7 +1131,6 @@ function test_down_arrow_scrolls_down_by_one_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1203,7 +1158,6 @@ function test_down_arrow_scrolls_down_by_one_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1232,7 +1186,6 @@ function test_down_arrow_scrolls_down_by_one_screen_line_after_splitting_within_ Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1260,7 +1213,6 @@ function test_pagedown_followed_by_down_arrow_does_not_scroll_screen_up() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1294,7 +1246,6 @@ function test_up_arrow_moves_cursor() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1326,7 +1277,6 @@ function test_up_arrow_skips_drawing() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1348,7 +1298,6 @@ function test_up_arrow_scrolls_up_by_one_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'def', 'baseline/screen:1') @@ -1376,7 +1325,6 @@ function test_up_arrow_scrolls_up_by_one_line_skipping_drawing() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=1} Editor_state.screen_top1 = {line=3, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'def', 'baseline/screen:1') @@ -1398,7 +1346,6 @@ function test_up_arrow_scrolls_up_by_one_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=6} Editor_state.screen_top1 = {line=3, pos=5} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'jkl', 'baseline/screen:1') @@ -1426,7 +1373,6 @@ function test_up_arrow_scrolls_up_to_final_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'ghi', 'baseline/screen:1') @@ -1456,7 +1402,6 @@ function test_up_arrow_scrolls_up_to_empty_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1483,7 +1428,6 @@ function test_pageup() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} -- initially the last two lines are displayed edit.draw(Editor_state) local y = Editor_state.top @@ -1508,7 +1452,6 @@ function test_pageup_scrolls_up_by_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'ghi', 'baseline/screen:1') @@ -1537,7 +1480,6 @@ function test_pageup_scrolls_up_from_middle_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=5} Editor_state.screen_top1 = {line=2, pos=5} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'jkl', 'baseline/screen:2') @@ -1564,7 +1506,6 @@ function test_enter_on_bottom_line_scrolls_down() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1593,7 +1534,6 @@ function test_enter_on_final_line_avoids_scrolling_down_when_not_at_bottom() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=4, pos=2} Editor_state.screen_top1 = {line=4, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'jkl', 'baseline/screen:1') @@ -1616,7 +1556,6 @@ function test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bot Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- after hitting the inserting_text key the screen does not scroll down edit.run_after_text_input(Editor_state, 'a') @@ -1635,7 +1574,6 @@ function test_typing_on_bottom_line_scrolls_down() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=4} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc', 'baseline/screen:1') @@ -1665,7 +1603,6 @@ function test_left_arrow_scrolls_up_in_wrapped_line() Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'} Text.redraw_all(Editor_state) Editor_state.screen_top1 = {line=3, pos=5} - Editor_state.screen_bottom1 = {} -- cursor is at top of screen Editor_state.cursor1 = {line=3, pos=5} edit.draw(Editor_state) @@ -1694,7 +1631,6 @@ function test_right_arrow_scrolls_down_in_wrapped_line() Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'} Text.redraw_all(Editor_state) Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- cursor is at bottom right of screen Editor_state.cursor1 = {line=3, pos=5} edit.draw(Editor_state) @@ -1724,7 +1660,6 @@ function test_home_scrolls_up_in_wrapped_line() Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'} Text.redraw_all(Editor_state) Editor_state.screen_top1 = {line=3, pos=5} - Editor_state.screen_bottom1 = {} -- cursor is at top of screen Editor_state.cursor1 = {line=3, pos=5} edit.draw(Editor_state) @@ -1753,7 +1688,6 @@ function test_end_scrolls_down_in_wrapped_line() Editor_state.lines = load_array{'abc', 'def', 'ghi jkl', 'mno'} Text.redraw_all(Editor_state) Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- cursor is at bottom right of screen Editor_state.cursor1 = {line=3, pos=5} edit.draw(Editor_state) @@ -1784,7 +1718,6 @@ function test_position_cursor_on_recently_edited_wrapping_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=25} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'abc def ghi ', 'baseline1/screen:1') @@ -1818,7 +1751,6 @@ function test_backspace_can_scroll_up() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=2, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'def', 'baseline/screen:1') @@ -1846,7 +1778,6 @@ function test_backspace_can_scroll_up_screen_line() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=3, pos=5} Editor_state.screen_top1 = {line=3, pos=5} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) local y = Editor_state.top App.screen.check(y, 'jkl', 'baseline/screen:1') @@ -1981,7 +1912,6 @@ function test_undo_insert_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=4} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- insert a character edit.draw(Editor_state) edit.run_after_text_input(Editor_state, 'g') @@ -2016,7 +1946,6 @@ function test_undo_delete_text() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=5} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} -- delete a character edit.run_after_keychord(Editor_state, 'backspace', 'backspace') check_eq(Editor_state.cursor1.line, 2, 'baseline/cursor:line') @@ -2055,7 +1984,6 @@ function test_undo_restores_selection() Editor_state.cursor1 = {line=1, pos=1} Editor_state.selection1 = {line=1, pos=2} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- delete selected text edit.run_after_text_input(Editor_state, 'x') @@ -2076,7 +2004,6 @@ function test_search() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- search for a string edit.run_after_keychord(Editor_state, 'C-f', 'f') @@ -2103,7 +2030,6 @@ function test_search_upwards() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- search for a string edit.run_after_keychord(Editor_state, 'C-f', 'f') @@ -2121,7 +2047,6 @@ function test_search_wrap() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=2, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- search for a string edit.run_after_keychord(Editor_state, 'C-f', 'f') @@ -2139,7 +2064,6 @@ function test_search_wrap_upwards() Text.redraw_all(Editor_state) Editor_state.cursor1 = {line=1, pos=1} Editor_state.screen_top1 = {line=1, pos=1} - Editor_state.screen_bottom1 = {} edit.draw(Editor_state) -- search upwards for a string edit.run_after_keychord(Editor_state, 'C-f', 'f') |