diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:38:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:38:10 +0000 |
commit | 6ad5e5b3d0d0029af2401594ecc398fcb6bc9ff5 (patch) | |
tree | 4a648e2fca058a515ad4dfe12302bb9d41ca1c7d /pgcli/pgtoolbar.py | |
parent | Releasing debian version 3.5.0-5. (diff) | |
download | pgcli-6ad5e5b3d0d0029af2401594ecc398fcb6bc9ff5.tar.xz pgcli-6ad5e5b3d0d0029af2401594ecc398fcb6bc9ff5.zip |
Merging upstream version 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" |