Skip to content

Commit 07420f0

Browse files
committed
Use InputMode.REPLACE_SINGLE
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.
1 parent f3442f4 commit 07420f0

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Features:
55
---------
66

77
* Add an option `--init-command` to execute SQL after connecting (Thanks: [KITAGAWA Yasutaka]).
8+
* Use InputMode.REPLACE_SINGLE
89

910
1.22.2
1011
======

mycli/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Contributors:
7575
* Zach DeCook
7676
* kevinhwang91
7777
* KITAGAWA Yasutaka
78+
* bitkeen
7879

7980
Creator:
8081
--------

mycli/clitoolbar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ def _get_vi_mode():
4848
InputMode.INSERT: 'I',
4949
InputMode.NAVIGATION: 'N',
5050
InputMode.REPLACE: 'R',
51+
InputMode.REPLACE_SINGLE: 'R',
5152
InputMode.INSERT_MULTIPLE: 'M',
5253
}[get_app().vi_state.input_mode]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
install_requirements = [
2020
'click >= 7.0',
2121
'Pygments >= 1.6',
22-
'prompt_toolkit>=3.0.0,<4.0.0',
22+
'prompt_toolkit>=3.0.6,<4.0.0',
2323
'PyMySQL >= 0.9.2',
2424
'sqlparse>=0.3.0,<0.4.0',
2525
'configobj >= 5.0.5',

0 commit comments

Comments
 (0)