MCPcopy Index your code
hub / github.com/bpython/bpython / _set_cursor_offset

Method _set_cursor_offset

bpython/curtsiesfrontend/repl.py:1896–1916  ·  view source on GitHub ↗
(
        self,
        offset: int,
        update_completion=True,
        reset_rl_history=False,
        clear_special_mode=True,
    )

Source from the content-addressed store, hash-verified

1894 return self._cursor_offset
1895
1896 def _set_cursor_offset(
1897 self,
1898 offset: int,
1899 update_completion=True,
1900 reset_rl_history=False,
1901 clear_special_mode=True,
1902 ):
1903 if self._cursor_offset == offset:
1904 return
1905 if self.paste_mode:
1906 self._cursor_offset = offset
1907 self.unhighlight_paren()
1908 return
1909 if reset_rl_history:
1910 self.rl_history.reset()
1911 if clear_special_mode:
1912 self.incr_search_mode = SearchMode.NO_SEARCH
1913 self._cursor_offset = offset
1914 if update_completion:
1915 self.update_completion()
1916 self.unhighlight_paren()
1917
1918 def echo(self, msg, redraw=True):
1919 """

Callers 5

get_last_wordMethod · 0.95
incremental_searchMethod · 0.95
on_enterMethod · 0.95
up_one_lineMethod · 0.95
down_one_lineMethod · 0.95

Calls 3

unhighlight_parenMethod · 0.95
update_completionMethod · 0.95
resetMethod · 0.45

Tested by

no test coverage detected