From af8b8c2cfc60ed26cc66987637b73277309b51f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= <glx22@users.noreply.github.com>
Date: Sun, 24 Dec 2023 01:08:18 +0100
Subject: [PATCH] Fix 4a2038e301: fully restore script break filter on reopen
 (#11622)

---
 src/script/script_gui.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp
index 52f33023d4..28d9356cc3 100644
--- a/src/script/script_gui.cpp
+++ b/src/script/script_gui.cpp
@@ -800,8 +800,9 @@ struct ScriptDebugWindow : public Window {
 		SetWidgetsDisabledState(!this->show_break_box, WID_SCRD_BREAK_STR_ON_OFF_BTN, WID_SCRD_BREAK_STR_EDIT_BOX, WID_SCRD_MATCH_CASE_BTN);
 		this->hscroll->SetStepSize(10); // Speed up horizontal scrollbar
 
-		/* Restore the break string value from static variable */
+		/* Restore the break string value from static variable, and enable the filter. */
 		this->break_editbox.text.Assign(this->filter.break_string);
+		this->break_string_filter.SetFilterTerm(this->filter.break_string);
 
 		if (show_company == INVALID_COMPANY) {
 			this->SelectValidDebugCompany();