From e9c97072afe9d79276da568ef6791276fddb15d7 Mon Sep 17 00:00:00 2001 From: bitkeen <31455852+bitkeen@users.noreply.github.com> Date: Sun, 6 Sep 2020 00:30:46 +0300 Subject: Use InputMode.REPLACE_SINGLE (#1208) InputMode.REPLACE_SINGLE was added to prompt-toolkit. This fixes Exception in single-char replace mode when using prompt_toolkit>=3.0.6. --- pgcli/pgtoolbar.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pgcli/pgtoolbar.py b/pgcli/pgtoolbar.py index f4e7f141..f4289a1a 100644 --- a/pgcli/pgtoolbar.py +++ b/pgcli/pgtoolbar.py @@ -7,6 +7,7 @@ def _get_vi_mode(): InputMode.INSERT: "I", InputMode.NAVIGATION: "N", InputMode.REPLACE: "R", + InputMode.REPLACE_SINGLE: "R", InputMode.INSERT_MULTIPLE: "M", }[get_app().vi_state.input_mode] diff --git a/setup.py b/setup.py index a3079298..5a221d98 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ install_requirements = [ "pgspecial>=1.11.8", "click >= 4.1", "Pygments >= 2.0", # Pygments has to be Capitalcased. WTF? - "prompt_toolkit>=2.0.6,<4.0.0", + "prompt_toolkit>=3.0.6,<4.0.0", "psycopg2 >= 2.8", "sqlparse >=0.3.0,<0.4", "configobj >= 5.0.6", -- cgit v1.2.3