mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
GTextEditor: Fixed bug in find_prev
Find_prev returned invalid when the contents of the file were equal to the contents of the search box. This is due to the checker walking on an empty character at the end of a line.
This commit is contained in:
parent
2147b587b2
commit
b50ffaf7e1
Notes:
sideshowbarker
2024-07-19 17:44:48 +09:00
Author: https://github.com/aanddrew
Commit: b50ffaf7e1
Pull-request: https://github.com/SerenityOS/serenity/pull/488
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 0 deletions
|
@ -1295,6 +1295,7 @@ GTextRange GTextEditor::find_prev(const StringView& needle, const GTextPosition&
|
|||
return {};
|
||||
|
||||
GTextPosition position = start.is_valid() ? start : GTextPosition(0, 0);
|
||||
position = prev_position_before(position);
|
||||
GTextPosition original_position = position;
|
||||
|
||||
GTextPosition end_of_potential_match;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue