浏览代码

Fixed removing secondary carets when editing with search open

Paulb23 2 年之前
父节点
当前提交
8cb05a5e53
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/code_editor.cpp

+ 3 - 1
editor/code_editor.cpp

@@ -143,7 +143,9 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
 }
 
 bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) {
-	text_editor->remove_secondary_carets();
+	if (!preserve_cursor) {
+		text_editor->remove_secondary_carets();
+	}
 	String text = get_search_text();
 	Point2i pos = text_editor->search(text, p_flags, p_from_line, p_from_col);