QScintilla/SearchReplaceWidget.py

changeset 6573
ccac2d1f6858
parent 6571
feb72cfc7807
child 6574
c13af8becbf4
diff -r dd7ed346b052 -r ccac2d1f6858 QScintilla/SearchReplaceWidget.py
--- a/QScintilla/SearchReplaceWidget.py	Thu Nov 01 15:43:03 2018 +0100
+++ b/QScintilla/SearchReplaceWidget.py	Thu Nov 01 18:46:44 2018 +0100
@@ -23,6 +23,7 @@
 import UI.PixmapCache
 
 
+# TODO: add support for more POSIX like regexp support of QScintilla
 class SearchReplaceWidget(QWidget):
     """
     Class implementing the search and replace widget.
@@ -80,14 +81,14 @@
         whatsThis += self.tr(
             """<table border="0">
 <tr><td><code>.</code></td><td>Matches any character</td></tr>
-<tr><td><code>\\(</code></td><td>This marks the start of a region for tagging a
+<tr><td><code>(</code></td><td>This marks the start of a region for tagging a
 match.</td></tr>
-<tr><td><code>\\)</code></td><td>This marks the end of a tagged region.
+<tr><td><code>)</code></td><td>This marks the end of a tagged region.
 </td></tr>
 <tr><td><code>\\n</code></td>
 <td>Where <code>n</code> is 1 through 9 refers to the first through ninth
 tagged region when replacing. For example, if the search string was
-<code>Fred\\([1-9]\\)XXX</code> and the replace string was
+<code>Fred([1-9])XXX</code> and the replace string was
 <code>Sam\\1YYY</code>, when applied to <code>Fred2XXX</code> this would
 generate <code>Sam2YYY</code>.</td></tr>
 <tr><td><code>\\&lt;</code></td>
@@ -548,7 +549,8 @@
                 self.ui.wordCheckBox.isChecked(),
                 self.ui.wrapCheckBox.isChecked(),
                 not backwards,
-                line, index)
+                line, index,
+                posix=self.ui.regexpCheckBox.isChecked())
         
         if ok and self.ui.selectionCheckBox.isChecked():
             lineFrom, indexFrom, lineTo, indexTo = aw.getSelection()
@@ -599,7 +601,8 @@
                         self.ui.wordCheckBox.isChecked(),
                         self.ui.wrapCheckBox.isChecked(),
                         not backwards,
-                        line, index)
+                        line, index,
+                        posix=self.ui.regexpCheckBox.isChecked())
                     if ok:
                         lineFrom, indexFrom, lineTo, indexTo = \
                             aw.getSelection()
@@ -625,7 +628,8 @@
                         self.ui.wordCheckBox.isChecked(),
                         self.ui.wrapCheckBox.isChecked(),
                         not backwards,
-                        line, index)
+                        line, index,
+                        posix=self.ui.regexpCheckBox.isChecked())
                     if ok:
                         lineFrom, indexFrom, lineTo, indexTo = \
                             aw.getSelection()
@@ -842,7 +846,8 @@
             self.ui.regexpCheckBox.isChecked(),
             self.ui.caseCheckBox.isChecked(),
             self.ui.wordCheckBox.isChecked(),
-            False, True, line, index)
+            False, True, line, index,
+            posix=self.ui.regexpCheckBox.isChecked())
         
         if ok and self.ui.selectionCheckBox.isChecked():
             lineFrom, indexFrom, lineTo, indexTo = aw.getSelection()
@@ -881,7 +886,8 @@
                         self.ui.regexpCheckBox.isChecked(),
                         self.ui.caseCheckBox.isChecked(),
                         self.ui.wordCheckBox.isChecked(),
-                        False, True, line, index)
+                        False, True, line, index,
+                        posix=self.ui.regexpCheckBox.isChecked())
                     if ok:
                         lineFrom, indexFrom, lineTo, indexTo = \
                             aw.getSelection()

eric ide

mercurial