diff --git a/IPython/terminal/prompts.py b/IPython/terminal/prompts.py index db1b751..ee2c5d7 100644 --- a/IPython/terminal/prompts.py +++ b/IPython/terminal/prompts.py @@ -7,6 +7,7 @@ from IPython.core.displayhook import DisplayHook from prompt_toolkit.formatted_text import fragment_list_width, PygmentsTokens from prompt_toolkit.shortcuts import print_formatted_text +from prompt_toolkit.enums import EditingMode class Prompts(object): @@ -14,7 +15,7 @@ class Prompts(object): self.shell = shell def vi_mode(self): - if (getattr(self.shell.pt_app, 'editing_mode', None) == 'VI' + if (getattr(self.shell.pt_app, 'editing_mode', None) == EditingMode.VI and self.shell.prompt_includes_vi_mode): return '['+str(self.shell.pt_app.app.vi_state.input_mode)[3:6]+'] ' return ''