diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:38:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:38:03 +0000 |
commit | fa11d0da51045077b543d42a1ab661c4a20b5127 (patch) | |
tree | aac9e87c59cb8bc7e3cd429e9200c3ca017cb591 /pgcli/pgtoolbar.py | |
parent | Adding upstream version 3.5.0. (diff) | |
download | pgcli-upstream/4.0.1.tar.xz pgcli-upstream/4.0.1.zip |
Adding upstream version 4.0.1.upstream/4.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pgcli/pgtoolbar.py')
-rw-r--r-- | pgcli/pgtoolbar.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pgcli/pgtoolbar.py b/pgcli/pgtoolbar.py index 7b5883e..4a12ff4 100644 --- a/pgcli/pgtoolbar.py +++ b/pgcli/pgtoolbar.py @@ -1,18 +1,14 @@ -from pkg_resources import packaging - -import prompt_toolkit from prompt_toolkit.key_binding.vi_state import InputMode from prompt_toolkit.application import get_app -parse_version = packaging.version.parse - vi_modes = { InputMode.INSERT: "I", InputMode.NAVIGATION: "N", InputMode.REPLACE: "R", InputMode.INSERT_MULTIPLE: "M", } -if parse_version(prompt_toolkit.__version__) >= parse_version("3.0.6"): +# REPLACE_SINGLE is available in prompt_toolkit >= 3.0.6 +if "REPLACE_SINGLE" in {e.name for e in InputMode}: vi_modes[InputMode.REPLACE_SINGLE] = "R" |