specified in jupyter_console_config.py, the terminal output, in all vi modes, looks like:
The reason for the error is found here.
The Enumself.pt_cli.app.vi_state.input_mode is passed into the str function, which only shows the the enum name and member name, not the value of the member, cf the Python docs.
The Enum used is the InputMode.INSERTEnum from prompt_toolkit defined here.
Applying the str function returns InputMode.INSERT and subsetting this with [3:6] yields the utM shown in the terminal screenshot.
This pull requests fixes this issue by simply removing the application of the str function before subsetting the enum member. This is also what is done in the IPython repo here.
With the
vi
optionsspecified in
jupyter_console_config.py
, the terminal output, in allvi
modes, looks like:The reason for the error is found here. The
Enum
self.pt_cli.app.vi_state.input_mode
is passed into thestr
function, which only shows the the enum name and member name, not the value of the member, cf the Python docs. TheEnum
used is theInputMode.INSERT
Enum
fromprompt_toolkit
defined here. Applying thestr
function returnsInputMode.INSERT
and subsetting this with[3:6]
yields theutM
shown in the terminal screenshot.This pull requests fixes this issue by simply removing the application of the
str
function before subsetting the enum member. This is also what is done in theIPython
repo here.