1. zinark
  2. thg


Angel Ezquerra  committed 67b5fd0

fileview: never hide the search toolbar when Ctrl-F is pressed

The current behavior of the search toolbar is not consistent. In the editor
windows hitting Ctrl-F always shows the search toolbar and gives it the focus.
On the other hand, on the fileviews it toggles the search toolbar.

Most editors (e.g. Notepad++, PyCharm, PyScripter, Eclipse, SublimeText 2)
follow the first behavior, i.e. they never toggle the visibility of the search
toolbar or the search dialog when Ctrl-F is clicked. Instead they ensure that
the search toolbar or search dialog is visible and give it the focus.

This patch changes the behavior of the fileviews so that they match the
behavior of the file editors.

  • Participants
  • Parent commits 03aa4e7
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/fileview.py

View file
         self.actionFind = self.searchbar.toggleViewAction()
         self.actionFind.setToolTip(_('Toggle display of text search bar'))
-        self.actionFind.setShortcuts(QKeySequence.Find)
+        qtlib.newshortcutsforstdkey(QKeySequence.Find, self, self.searchbar.show)
         self.actionShelf = QAction('Shelve', self)