src/eric7/QScintilla/SearchReplaceWidget.py

branch
eric7
changeset 9977
a5acf678c367
parent 9972
68ac01294544
child 9981
932af5154428
--- 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

eric ide

mercurial