Merge pull request #31355 from nekomatata/fix-select-prev-freeze
Fixed freeze on search previous
This commit is contained in:
commit
fcec358840
1 changed files with 8 additions and 6 deletions
|
@ -374,12 +374,14 @@ bool FindReplaceBar::search_prev() {
|
||||||
int line, col;
|
int line, col;
|
||||||
_get_search_from(line, col);
|
_get_search_from(line, col);
|
||||||
|
|
||||||
col -= text.length();
|
if (line == result_line && col == result_col) {
|
||||||
if (col < 0) {
|
col -= text.length();
|
||||||
line -= 1;
|
if (col < 0) {
|
||||||
if (line < 0)
|
line -= 1;
|
||||||
line = text_edit->get_line_count() - 1;
|
if (line < 0)
|
||||||
col = text_edit->get_line(line).length();
|
line = text_edit->get_line_count() - 1;
|
||||||
|
col = text_edit->get_line(line).length();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _search(flags, line, col);
|
return _search(flags, line, col);
|
||||||
|
|
Loading…
Reference in a new issue