Andrea Stagi committed 243a38c

manifestdialog: set ignorecase during init, fixes highlighting on Annotate File in search

Comments (0)

Files changed (2)


  = pattern
+ = icase
         inc = hglib.fromunicode(self.incle.text())
         if inc: inc = inc.split(', ')
         self.repo = repo
         self.pattern = None
+        self.icase = False
         self.embedded = parent.parent() is not None
         self.selectedRows = ()
     def onAnnotateFile(self):
         from tortoisehg.hgqt.manifestdialog import run
         from import qtrun
-        repo, ui, pattern = self.repo, self.repo.ui, self.pattern
+        repo, ui, pattern, icase = self.repo, self.repo.ui, self.pattern, self.icase
         seen = set()
         for rev, path, line in self.selectedRows:
             # Only open one annotate instance per file
                         rev = repo['.'].rev()
                     srepo = thgrepo.repository(None, root)
                     opts = {'repo': srepo, 'canonpath' : path, 'rev' : rev,
-                            'line': line, 'pattern': pattern}
+                            'line': line, 'pattern': pattern, 'ignorecase': icase}
                     qtrun(run, ui, **opts)
                 if rev is None:
                     rev = repo['.'].rev()
                 opts = {'repo': repo, 'canonpath' : path, 'rev' : rev,
-                        'line': line, 'pattern': pattern}
+                        'line': line, 'pattern': pattern, 'ignorecase': icase}
                 qtrun(run, ui, **opts)
     def onViewChangeset(self):


         """Set search pattern [unicode]"""
+    def setSearchCaseInsensitive(self, ignorecase):
+        """Set if search is case insensitive"""
+        self._manifest_widget._fileview.searchbar.setCaseInsensitive(ignorecase)
     @pyqtSlot(unicode, dict)
     def _openSearchWidget(self, pattern, opts):
         opts = dict((str(k), str(v)) for k, v in opts.iteritems())
             if dlg._manifest_widget._fileview.actionAnnMode.isEnabled():
+            dlg.setSearchCaseInsensitive(opts['ignorecase'])
         except IndexError:
         dlg.setSearchPattern(hglib.tounicode(opts.get('pattern')) or '')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.