Skip to content

Commit 39d5874

Browse files
-
1 parent 848e6a2 commit 39d5874

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

prompt_toolkit/contrib/python_input.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,15 @@ def get_tokens(cli):
361361
else:
362362
completion_style = 'off'
363363

364-
append((TB, ' [F2] Show sidebar (on)\n'))
364+
append((TB, ' [F2] Sidebar (on)\n'))
365365
append((TB, ' [F3] Completion menu (%s)\n' % completion_style))
366366
append((TB, ' [F4] Input mode (%s)\n' % mode))
367367
append((TB, ' [F5] Merge from history\n'))
368368

369369
if settings.paste_mode:
370-
append((TB, ' [F6] Paste (on) \n'))
370+
append((TB, ' [F6] Paste mode (on) \n'))
371371
else:
372-
append((TB, ' [F6] Paste (off) \n'))
372+
append((TB, ' [F6] Paste mode (off) \n'))
373373

374374
if settings.currently_multiline:
375375
append((TB, ' [F7] Multiline (on)\n'))
@@ -416,9 +416,11 @@ def get_tokens(cli):
416416

417417
for i, p in enumerate(sig.params):
418418
if i == sig.index:
419-
append((Signature.CurrentName, str(p.name)))
419+
# Note: we use `_Param.description` instead of
420+
# `_Param.name`, that way we also get the '*' before args.
421+
append((Signature.CurrentName, str(p.description)))
420422
else:
421-
append((Signature, str(p.name)))
423+
append((Signature, str(p.description)))
422424
append((Signature.Operator, ', '))
423425

424426
if sig.params:
@@ -563,7 +565,7 @@ def __init__(self):
563565
token = Token.Toolbar.Status
564566

565567
def get_tokens(cli):
566-
return [(token, ' [F2] Show sidebar')]
568+
return [(token, ' [F2] Sidebar')]
567569

568570
super(ShowSidebarButtonInfo, self).__init__(
569571
TokenListControl(get_tokens, default_char=Char(token=token)),

prompt_toolkit/layout/toolbars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self):
4545
super(SystemToolbar, self).__init__(
4646
SystemToolbarControl(),
4747
height=LayoutDimension.exact(1),
48-
filter=HasFocus('system'))
48+
filter=HasFocus('system') & ~IsReturning() & ~IsAborting() & ~IsExiting())
4949

5050

5151
class ArgToolbarControl(TokenListControl):
@@ -94,7 +94,7 @@ def __init__(self):
9494
super(SearchToolbar, self).__init__(
9595
SearchToolbarControl(),
9696
height=LayoutDimension.exact(1),
97-
filter=HasSearch())
97+
filter=HasSearch() & ~IsReturning() & ~IsAborting() & ~IsExiting())
9898

9999

100100
class CompletionsToolbarControl(UIControl):

0 commit comments

Comments
 (0)