Dont use Tab to cycle through completions as we have the arrow keys and Tab doesn't work when the completions popup is not visible

This commit is contained in:
Kovid Goyal 2012-07-17 15:11:35 +05:30
parent 7aafb31929
commit b6b1436c1b
2 changed files with 3 additions and 3 deletions

View File

@ -522,5 +522,5 @@ enable_multicharacters_in_tag_browser = True
# completions you will now have to press Tab to select one before pressing
# Enter. Which technique you prefer will depend on the state of metadata in
# your library and your personal editing style.
preselect_first_completion = False
preselect_first_completion = True

View File

@ -193,8 +193,8 @@ class Completer(QListView): # {{{
if key in (Qt.Key_PageUp, Qt.Key_PageDown):
# Let the list view handle these keys
return False
if key in (Qt.Key_Tab, Qt.Key_Backtab, Qt.Key_Up, Qt.Key_Down):
self.next_match(previous=key in (Qt.Key_Backtab, Qt.Key_Up))
if key in (Qt.Key_Up, Qt.Key_Down):
self.next_match(previous=key == Qt.Key_Up)
e.accept()
return True
# Send to widget