Keyboard shortcuts for find next and previous in diff view

This commit is contained in:
Kovid Goyal 2014-01-27 21:38:53 +05:30
parent cb63a16439
commit d09c93fc66

View File

@ -248,6 +248,13 @@ class Diff(Dialog):
text = self.view.view.left.selected_text + self.view.view.right.selected_text text = self.view.view.left.selected_text + self.view.view.right.selected_text
if text: if text:
QApplication.clipboard().setText(text) QApplication.clipboard().setText(text)
return
if ev.matches(QKeySequence.FindNext):
self.sbn.click()
return
if ev.matches(QKeySequence.FindPrevious):
self.sbp.click()
return
return Dialog.keyPressEvent(self, ev) return Dialog.keyPressEvent(self, ev)
if __name__ == '__main__': if __name__ == '__main__':