mirror of
https://github.com/dbcli/pgcli.git
synced 2024-10-04 09:17:08 +03:00
keybinding for dismissing autocompletelist (#1007)
* +added esc key to dismiss the autocomple list * +added esc key to dismiss the autocomple list
This commit is contained in:
parent
484abb6530
commit
bd0aaefdd2
1
AUTHORS
1
AUTHORS
@ -89,6 +89,7 @@ Contributors:
|
||||
* Ignacio Campabadal
|
||||
* Mikhail Elovskikh (wronglink)
|
||||
* Marcin Cieślak (saper)
|
||||
* easteregg
|
||||
|
||||
Creator:
|
||||
--------
|
||||
|
@ -1,6 +1,11 @@
|
||||
Upcoming:
|
||||
=========
|
||||
|
||||
Features:
|
||||
---------
|
||||
|
||||
* keybindings for closing the autocomplete list
|
||||
|
||||
Bug fixes:
|
||||
----------
|
||||
* Avoid error message on the server side if hstore extension is not installed in the current database (#991). (Thanks: `Marcin Cieślak`_)
|
||||
|
@ -41,6 +41,16 @@ def pgcli_bindings(pgcli):
|
||||
else:
|
||||
b.start_completion(select_first=True)
|
||||
|
||||
@kb.add('escape')
|
||||
def _(event):
|
||||
"""Force closing of autocompletion."""
|
||||
_logger.debug('Detected <Esc> key.')
|
||||
|
||||
event.current_buffer.complete_state = None
|
||||
event.app.current_buffer.complete_state = None
|
||||
|
||||
|
||||
|
||||
@kb.add('c-space')
|
||||
def _(event):
|
||||
"""
|
||||
@ -71,7 +81,6 @@ def pgcli_bindings(pgcli):
|
||||
_logger.debug('Detected enter key.')
|
||||
|
||||
event.current_buffer.complete_state = None
|
||||
b = event.app.current_buffer
|
||||
b.complete_state = None
|
||||
event.app.current_buffer.complete_state = None
|
||||
|
||||
return kb
|
||||
|
Loading…
Reference in New Issue
Block a user