##// END OF EJS Templates
Merge pull request #13501 from ltrujello/fix_vi_cursor...
Matthias Bussonnier -
r27542:34e9225d merge
parent child Browse files
Show More
@@ -3702,6 +3702,10 b' class InteractiveShell(SingletonConfigurable):'
3702 pass
3702 pass
3703 del self.tempdirs
3703 del self.tempdirs
3704
3704
3705 # Restore user's cursor
3706 if hasattr(self, "editing_mode") and self.editing_mode == "vi":
3707 sys.stdout.write("\x1b[0 q")
3708 sys.stdout.flush()
3705
3709
3706 def cleanup(self):
3710 def cleanup(self):
3707 self.restore_sys_module_state()
3711 self.restore_sys_module_state()
@@ -338,12 +338,7 b' def create_ipython_shortcuts(shell):'
338 shape = {InputMode.NAVIGATION: 2, InputMode.REPLACE: 4}.get(mode, 6)
338 shape = {InputMode.NAVIGATION: 2, InputMode.REPLACE: 4}.get(mode, 6)
339 cursor = "\x1b[{} q".format(shape)
339 cursor = "\x1b[{} q".format(shape)
340
340
341 if hasattr(sys.stdout, "_cli"):
341 sys.stdout.write(cursor)
342 write = sys.stdout._cli.output.write_raw
343 else:
344 write = sys.stdout.write
345
346 write(cursor)
347 sys.stdout.flush()
342 sys.stdout.flush()
348
343
349 self._input_mode = mode
344 self._input_mode = mode
General Comments 0
You need to be logged in to leave comments. Login now