Drop the whole case check in replace
This commit is contained in:
+3
-12
@@ -1237,18 +1237,10 @@ class GuiDocEditor(QTextEdit):
|
||||
replWith = self.docSearch.getReplaceText()
|
||||
selText = theCursor.selectedText()
|
||||
|
||||
if self.docSearch.doMatchCap:
|
||||
replWith = transferCase(selText, replWith)
|
||||
if searchFor:
|
||||
if self.docSearch.doMatchCap:
|
||||
replWith = transferCase(selText, replWith)
|
||||
|
||||
if self.docSearch.isRegEx:
|
||||
isMatch = True
|
||||
else:
|
||||
if not self.docSearch.isCaseSense:
|
||||
isMatch = searchFor.lower() == selText.lower()
|
||||
else:
|
||||
isMatch = searchFor == selText
|
||||
|
||||
if isMatch:
|
||||
theCursor.beginEditBlock()
|
||||
theCursor.removeSelectedText()
|
||||
theCursor.insertText(replWith)
|
||||
@@ -1259,7 +1251,6 @@ class GuiDocEditor(QTextEdit):
|
||||
searchFor, replWith, theCursor.blockNumber()
|
||||
))
|
||||
|
||||
if searchFor:
|
||||
self._findNext()
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user