2237 @type bool |
2237 @type bool |
2238 @param regexp flag indicating a regular expression search |
2238 @param regexp flag indicating a regular expression search |
2239 @type bool |
2239 @type bool |
2240 """ |
2240 """ |
2241 self.__lastSearch = (txt, caseSensitive, wholeWord, regexp) |
2241 self.__lastSearch = (txt, caseSensitive, wholeWord, regexp) |
|
2242 posixMode = Preferences.getEditor("SearchRegexpMode") == 0 and regexp |
|
2243 cxx11Mode = Preferences.getEditor("SearchRegexpMode") == 1 and regexp |
2242 ok = self.findFirst( |
2244 ok = self.findFirst( |
2243 txt, regexp, caseSensitive, wholeWord, True, forward=True, |
2245 txt, regexp, caseSensitive, wholeWord, True, forward=True, |
2244 posix=regexp) |
2246 posix=posixMode, cxx11=cxx11Mode) |
2245 self.searchStringFound.emit(ok) |
2247 self.searchStringFound.emit(ok) |
2246 |
2248 |
2247 def __searchPrev(self): |
2249 def __searchPrev(self): |
2248 """ |
2250 """ |
2249 Private method to search for the next occurrence. |
2251 Private method to search for the next occurrence. |
2269 self.__lastSearch = (txt, caseSensitive, wholeWord, regexp) |
2271 self.__lastSearch = (txt, caseSensitive, wholeWord, regexp) |
2270 if self.hasSelectedText(): |
2272 if self.hasSelectedText(): |
2271 line, index = self.getSelection()[:2] |
2273 line, index = self.getSelection()[:2] |
2272 else: |
2274 else: |
2273 line, index = -1, -1 |
2275 line, index = -1, -1 |
|
2276 posixMode = Preferences.getEditor("SearchRegexpMode") == 0 and regexp |
|
2277 cxx11Mode = Preferences.getEditor("SearchRegexpMode") == 1 and regexp |
2274 ok = self.findFirst( |
2278 ok = self.findFirst( |
2275 txt, regexp, caseSensitive, wholeWord, True, |
2279 txt, regexp, caseSensitive, wholeWord, True, |
2276 forward=False, line=line, index=index, posix=regexp) |
2280 forward=False, line=line, index=index, posix=posixMode, |
|
2281 cxx11=cxx11Mode) |
2277 self.searchStringFound.emit(ok) |
2282 self.searchStringFound.emit(ok) |
2278 |
2283 |
2279 def historyStyle(self): |
2284 def historyStyle(self): |
2280 """ |
2285 """ |
2281 Public method to get the shell history style. |
2286 Public method to get the shell history style. |