MCPcopy
hub / github.com/prompt-toolkit/ptpython / _get_bottom_toolbar_fragments

Function _get_bottom_toolbar_fragments

src/ptpython/history_browser.py:233–258  ·  view source on GitHub ↗
(history: PythonHistory)

Source from the content-addressed store, hash-verified

231
232
233def _get_bottom_toolbar_fragments(history: PythonHistory) -> StyleAndTextTuples:
234 python_input = history.python_input
235
236 @if_mousedown
237 def f1(mouse_event: MouseEvent) -> None:
238 _toggle_help(history)
239
240 @if_mousedown
241 def tab(mouse_event: MouseEvent) -> None:
242 _select_other_window(history)
243
244 return (
245 [("class:status-toolbar", " ")]
246 + get_inputmode_fragments(python_input)
247 + [
248 ("class:status-toolbar", " "),
249 ("class:status-toolbar.key", "[Space]"),
250 ("class:status-toolbar", " Toggle "),
251 ("class:status-toolbar.key", "[Tab]", tab),
252 ("class:status-toolbar", " Focus ", tab),
253 ("class:status-toolbar.key", "[Enter]"),
254 ("class:status-toolbar", " Accept "),
255 ("class:status-toolbar.key", "[F1]", f1),
256 ("class:status-toolbar", " Help ", f1),
257 ]
258 )
259
260
261class HistoryMargin(Margin):

Callers

nothing calls this directly

Calls 1

get_inputmode_fragmentsFunction · 0.90

Tested by

no test coverage detected