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

Method _set_current_line

bpython/curtsiesfrontend/repl.py:1872–1890  ·  view source on GitHub ↗
(
        self,
        line: str,
        update_completion=True,
        reset_rl_history=True,
        clear_special_mode=True,
    )

Source from the content-addressed store, hash-verified

1870 return self._current_line
1871
1872 def _set_current_line(
1873 self,
1874 line: str,
1875 update_completion=True,
1876 reset_rl_history=True,
1877 clear_special_mode=True,
1878 ):
1879 if self._current_line == line:
1880 return
1881 self._current_line = line
1882 if self.paste_mode:
1883 return
1884 if update_completion:
1885 self.update_completion()
1886 if reset_rl_history:
1887 self.rl_history.reset()
1888 if clear_special_mode:
1889 self.special_mode = None
1890 self.unhighlight_paren()
1891
1892 def _get_cursor_offset(self) -> int:
1893 """The current cursor offset from the front of the "line"."""

Callers 6

get_last_wordMethod · 0.95
incremental_searchMethod · 0.95
up_one_lineMethod · 0.95
down_one_lineMethod · 0.95
add_normal_characterMethod · 0.95

Calls 3

update_completionMethod · 0.95
unhighlight_parenMethod · 0.95
resetMethod · 0.45

Tested by

no test coverage detected