bugfix: stale function name when searching

This commit is contained in:
Kartik K. Agaram 2024-07-26 19:42:06 -07:00
parent 9ccdcbc5d7
commit 028e3ff6f6
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ function Text.search_next(Editor)
end
end
if offset then
snap_cursor_to_bottom_of_screen(Editor)
maybe_snap_cursor_to_bottom_of_screen(Editor)
else
-- roll back
Editor.cursor = deepcopy(Editor.search_backup.cursor)
@ -124,7 +124,7 @@ function Text.search_previous(Editor)
end
end
if offset then
snap_cursor_to_top_of_screen(Editor)
maybe_snap_cursor_to_top_of_screen(Editor)
else
-- roll back
Editor.cursor = deepcopy(Editor.search_backup.cursor)