X Tutup
Skip to content

Commit d4db7ed

Browse files
committed
Do not show disabled keyboard shortcuts (fixes bpython#282)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 5bf22e4 commit d4db7ed

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

bpython/cli.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,12 +1692,19 @@ def init_wins(scr, config):
16921692
# Thanks to Angus Gibson for pointing out this missing line which was causing
16931693
# problems that needed dirty hackery to fix. :)
16941694

1695-
statusbar = Statusbar(scr, main_win, background, config,
1696-
_(" <%s> Rewind <%s> Save <%s> Pastebin "
1697-
" <%s> Pager <%s> Show Source ") %
1698-
(config.undo_key, config.save_key, config.pastebin_key,
1699-
config.last_output_key, config.show_source_key),
1700-
get_colpair(config, 'main'))
1695+
commands = (
1696+
(_('Rewind'), config.undo_key),
1697+
(_('Save'), config.save_key),
1698+
(_('Pastebin'), config.pastebin_key),
1699+
(_('Pager'), config.last_output_key),
1700+
(_('Show Source'), config.show_source_key)
1701+
)
1702+
1703+
message = ' '.join('<%s> %s' % (key, command) for command, key in commands
1704+
if key)
1705+
1706+
statusbar = Statusbar(scr, main_win, background, config, message,
1707+
get_colpair(config, 'main'))
17011708

17021709
return main_win, statusbar
17031710

0 commit comments

Comments
 (0)
X Tutup