summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitkeen <31455852+bitkeen@users.noreply.github.com>2020-09-06 00:30:46 +0300
committerGitHub <noreply@github.com>2020-09-05 14:30:46 -0700
commite9c97072afe9d79276da568ef6791276fddb15d7 (patch)
tree1b12d3e5f9bc1b08f242251ae428784a8eeb10b3
parent223015a1facba4c2bfa1873235998cd845f0715e (diff)
Use InputMode.REPLACE_SINGLE (#1208)
InputMode.REPLACE_SINGLE was added to prompt-toolkit. This fixes Exception <InputMode.REPLACE_SINGLE: 'vi-replace-single'> in single-char replace mode when using prompt_toolkit>=3.0.6.
-rw-r--r--pgcli/pgtoolbar.py1
-rw-r--r--setup.py2
2 files changed, 2 insertions, 1 deletions
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",