diff -r cf725cf57445 -r 02a40e8bd135 src/eric7/QScintilla/SearchReplaceWidget.py --- a/src/eric7/QScintilla/SearchReplaceWidget.py Wed Mar 29 10:45:00 2023 +0200 +++ b/src/eric7/QScintilla/SearchReplaceWidget.py Wed Mar 29 11:32:06 2023 +0200 @@ -964,6 +964,17 @@ self.selectionCheckBox.setChecked(False) self.__selections = [] + @pyqtSlot(Editor) + def editorClosed(self, editor): + """ + Public slot to handle the closing of an editor. + + @param editor reference to the closed editor + @type Editor + """ + if self.__currentEditor is not None and self.__currentEditor is editor: + self.__currentEditor = None + def replace(self): """ Public method to replace the current selection. @@ -1430,6 +1441,16 @@ """ self.__searchReplaceWidget.updateSelectionCheckBox(editor) + @pyqtSlot(Editor) + def editorClosed(self, editor): + """ + Public slot to handle the closing of an editor. + + @param editor reference to the closed editor + @type Editor + """ + self.__searchReplaceWidget.editorClosed(editor) + def show(self, text="", replaceMode=False): """ Public slot to show the widget.