Explorar o código

Merge pull request #30326 from Anutrix/replace-all-fix-for-now

Got replace-all working without breaking search
Rémi Verschelde %!s(int64=6) %!d(string=hai) anos
pai
achega
c401639820
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      editor/code_editor.cpp

+ 5 - 1
editor/code_editor.cpp

@@ -341,7 +341,11 @@ bool FindReplaceBar::search_prev() {
 bool FindReplaceBar::search_next() {
 bool FindReplaceBar::search_next() {
 
 
 	uint32_t flags = 0;
 	uint32_t flags = 0;
-	String text = get_search_text();
+	String text;
+	if (replace_all_mode)
+		text = get_replace_text();
+	else
+		text = get_search_text();
 
 
 	if (is_whole_words())
 	if (is_whole_words())
 		flags |= TextEdit::SEARCH_WHOLE_WORDS;
 		flags |= TextEdit::SEARCH_WHOLE_WORDS;