summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2016-07-21 03:40:08 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2016-07-21 03:40:08 +0200
commitfc16954fa2d87707fa69293b7507dd43b028a96f (patch)
tree407078f918acd3cb8ed523f1fb6284125876f8b0 /tools
parent6a5e11c075b6bc48d23267c03a66e613dee2bf55 (diff)
TextEdit: Center search results
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/code_editor.cpp5
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);