--- a/src/eric7/QScintilla/SearchReplaceWidget.py Wed Apr 12 13:10:09 2023 +0200 +++ b/src/eric7/QScintilla/SearchReplaceWidget.py Thu Apr 13 19:33:10 2023 +0200 @@ -324,8 +324,14 @@ @return tuple of start line and index and end line and index @rtype tuple (int, int, int, int) """ + aw = self.__viewmanager.activeWindow() + if selections is None: - selections = self.__selections + selectionMarkerRange = aw.getSearchSelectionHighlight() + if selectionMarkerRange == (0, 0, 0, 0): + selections = self.__selections + else: + selections = [selectionMarkerRange] if selections: lineNumbers = [sel[0] for sel in selections] + [ sel[2] for sel in selections