mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Completion popups: Allow pressing Tab (in addition to Enter) to accept the current completion
This commit is contained in:
parent
992070d587
commit
35cca4e6cf
@ -207,6 +207,15 @@ class Completer(QListView): # {{{
|
||||
self.hide()
|
||||
e.accept()
|
||||
return True
|
||||
if key == Qt.Key_Tab:
|
||||
idx = self.currentIndex()
|
||||
if idx.isValid():
|
||||
self.item_chosen(idx)
|
||||
self.hide()
|
||||
elif self.model().rowCount() > 0:
|
||||
self.next_match()
|
||||
e.accept()
|
||||
return True
|
||||
if key in (Qt.Key_PageUp, Qt.Key_PageDown):
|
||||
# Let the list view handle these keys
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user