mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
TextEdit: Center search results
This commit is contained in:
parent
6a5e11c075
commit
fc16954fa2
3 changed files with 33 additions and 2 deletions
|
|
@ -133,8 +133,9 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
|
|||
|
||||
if (found) {
|
||||
if (!preserve_cursor) {
|
||||
text_edit->cursor_set_line(line);
|
||||
text_edit->cursor_set_column(col+text.length());
|
||||
text_edit->cursor_set_line(line, false);
|
||||
text_edit->cursor_set_column(col+text.length(), false);
|
||||
text_edit->center_viewport_to_cursor();
|
||||
}
|
||||
|
||||
text_edit->set_search_text(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue