mirror of
https://github.com/dbcli/pgcli.git
synced 2024-10-06 02:07:53 +03:00
Upgrade to prompt_toolkit 0.46
This commit is contained in:
parent
cec4e0bd0e
commit
954fc158fa
@ -14,6 +14,7 @@ def pgcli_bindings(get_vi_mode_enabled, set_vi_mode_enabled):
|
||||
|
||||
key_binding_manager = KeyBindingManager(
|
||||
enable_open_in_editor=True,
|
||||
enable_system_bindings=True,
|
||||
enable_vi_mode=Condition(lambda cli: get_vi_mode_enabled()))
|
||||
|
||||
@key_binding_manager.registry.add_binding(Keys.F2)
|
||||
|
@ -246,6 +246,7 @@ class PGCli(object):
|
||||
get_prompt_tokens=prompt_tokens,
|
||||
get_bottom_toolbar_tokens=get_toolbar_tokens,
|
||||
display_completions_in_columns=self.wider_completion_menu,
|
||||
multiline=True,
|
||||
extra_input_processors=[
|
||||
# Highlight matching brackets while editing.
|
||||
ConditionalProcessor(
|
||||
@ -260,7 +261,8 @@ class PGCli(object):
|
||||
application = Application(style=style_factory(self.syntax_style, self.cli_style),
|
||||
layout=layout, buffer=buf,
|
||||
key_bindings_registry=key_binding_manager.registry,
|
||||
on_exit=AbortAction.RAISE_EXCEPTION)
|
||||
on_exit=AbortAction.RAISE_EXCEPTION,
|
||||
ignore_case=True)
|
||||
cli = CommandLineInterface(application=application,
|
||||
eventloop=create_eventloop())
|
||||
|
||||
|
@ -51,14 +51,20 @@ Token.Menu.Completions.Completion.Current = 'bg:#ffffff #000000'
|
||||
Token.Menu.Completions.Completion = 'bg:#008888 #ffffff'
|
||||
Token.Menu.Completions.Meta.Current = 'bg:#44aaaa #000000'
|
||||
Token.Menu.Completions.Meta = 'bg:#448888 #ffffff'
|
||||
Token.Menu.Completions.MultiColumnMeta = 'bg:#aaffff #000000'
|
||||
Token.Menu.Completions.ProgressButton = 'bg:#003333'
|
||||
Token.Menu.Completions.ProgressBar = 'bg:#00aaaa'
|
||||
Token.SelectedText = '#ffffff bg:#6666aa'
|
||||
Token.IncrementalSearchMatch = '#ffffff bg:#4444aa'
|
||||
Token.IncrementalSearchMatch.Current = '#ffffff bg:#44aa44'
|
||||
Token.SearchMatch = '#ffffff bg:#4444aa'
|
||||
Token.SearchMatch.Current = '#ffffff bg:#44aa44'
|
||||
Token.Toolbar = 'bg:#222222 #aaaaaa'
|
||||
Token.Toolbar.Off = 'bg:#222222 #888888'
|
||||
Token.Toolbar.On = 'bg:#222222 #ffffff'
|
||||
Token.Toolbar.Search = 'noinherit bold'
|
||||
Token.Toolbar.Search.Text = 'nobold'
|
||||
Token.Toolbar.System = 'noinherit bold'
|
||||
Token.Toolbar.Arg = 'noinherit bold'
|
||||
Token.Toolbar.Arg.Text = 'nobold'
|
||||
|
||||
# Named queries are queries you can execute by name.
|
||||
[named queries]
|
||||
|
Loading…
Reference in New Issue
Block a user