diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-23 22:54:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 22:54:32 +0200 |
commit | ebefdaa598e29791ba83598fd3e3aa3f52f2bf31 (patch) | |
tree | 7667d59bf72614ba31808d4c4971c21ccbb23eee /tools | |
parent | 990a23e48ea6dee7d311d450f1032c4e3526b0ac (diff) | |
parent | fc16954fa2d87707fa69293b7507dd43b028a96f (diff) |
Merge pull request #5737 from neikeq/pr-issue-5269
TextEdit: Scroll search results to the center
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/code_editor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 71ae171dfe..6c8d25aa01 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -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); |