MCPcopy Index your code
hub / github.com/ipython/ipython / set_input_mode

Function set_input_mode

IPython/terminal/shortcuts/__init__.py:367–374  ·  view source on GitHub ↗
(self, mode)

Source from the content-addressed store, hash-verified

365 return self._input_mode
366
367 def set_input_mode(self, mode):
368 shape = {InputMode.NAVIGATION: 2, InputMode.REPLACE: 4}.get(mode, 6)
369 cursor = "\x1b[{} q".format(shape)
370
371 sys.stdout.write(cursor)
372 sys.stdout.flush()
373
374 self._input_mode = mode
375
376 if shell.editing_mode == "vi" and shell.modal_cursor:
377 ViState._input_mode = InputMode.INSERT # type: ignore

Callers

nothing calls this directly

Calls 4

getMethod · 0.80
formatMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…