bugfix #2 in search UI
Dependencies
- [2]
O7YTBRQYbugfix: restart search on backspace - [3]
T6A5SZGBbugfix: restart search on backspace - [4]
G54H3YG2get rid of all bifold text - [5]
5ZA3BRNYadd state arg to a few functions - [6]
KKMFQDR4editing source code from within the app - [7]
2L5MEZV3experiment: new edit namespace - [8]
LF7BWEG4group all editor globals - [9]
LNUHQOGHstart passing in Editor_state explicitly - [*]
LXTTOB33extract a couple of files - [*]
MSOQI3A5bugfix: check before cursor on same line - [*]
AMOPICKVbugfix: check after cursor on same line when searching upwards
Change contents
- edit in text_tests.lua at line 2083
Editor_state.screen_top1 = {line=1, pos=1}edit.draw(Editor_state)-- search for empty stringedit.run_after_keychord(Editor_state, 'C-f', 'f')edit.run_after_keychord(Editor_state, 'down', 'down')-- no crashendfunction 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} - edit in source_text_tests.lua at line 2083
Editor_state.screen_top1 = {line=1, pos=1}edit.draw(Editor_state)-- search for empty stringedit.run_after_keychord(Editor_state, 'C-f', 'f')edit.run_after_keychord(Editor_state, 'down', 'down')-- no crashendfunction 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} - replacement in source_edit.lua at line 435[3.158906]→[2.1974:2049](∅→∅),[2.2049]→[3.159057:159087](∅→∅),[3.7269]→[3.159057:159087](∅→∅),[3.159057]→[3.159057:159087](∅→∅)
edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)Text.search_next(State)if #State.search_term > 0 thenedit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)Text.search_next(State)end - replacement in source_edit.lua at line 440
Text.search_previous(State)if #State.search_term > 0 thenText.search_previous(State)end - edit in search.lua at line 20
assert(#State.search_term > 0) - edit in search.lua at line 75[3.1072][13.761]
assert(#State.search_term > 0) - replacement in edit.lua at line 429
edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)Text.search_next(State)if #State.search_term > 0 thenedit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)Text.search_next(State)end - replacement in edit.lua at line 434
Text.search_previous(State)if #State.search_term > 0 thenText.search_previous(State)end