Merge pull request #31355 from nekomatata/fix-select-prev-freeze

Fixed freeze on search previous
This commit is contained in:
Rémi Verschelde 2019-08-13 20:47:45 +02:00 committed by GitHub
commit fcec358840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -374,6 +374,7 @@ bool FindReplaceBar::search_prev() {
int line, col; int line, col;
_get_search_from(line, col); _get_search_from(line, col);
if (line == result_line && col == result_col) {
col -= text.length(); col -= text.length();
if (col < 0) { if (col < 0) {
line -= 1; line -= 1;
@ -381,6 +382,7 @@ bool FindReplaceBar::search_prev() {
line = text_edit->get_line_count() - 1; line = text_edit->get_line_count() - 1;
col = text_edit->get_line(line).length(); col = text_edit->get_line(line).length();
} }
}
return _search(flags, line, col); return _search(flags, line, col);
} }