From 13627d19e8f577351cfcfaa52a3ee1d742539da3 Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Wed, 29 Jun 2016 14:32:21 +0200 Subject: [PATCH] buffer help: switch keybind sets --- sen/tui/views/help.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sen/tui/views/help.py b/sen/tui/views/help.py index 1b5ba9c..9cb2660 100644 --- a/sen/tui/views/help.py +++ b/sen/tui/views/help.py @@ -31,19 +31,10 @@ def refresh(self): SingleTextRow(self.buffer.description, maps={"normal": "main_list_dg", "focus": MAIN_LIST_FOCUS}), SingleTextRow(""), - SingleTextRow("Global Keybindings", - maps={"normal": "main_list_white", "focus": MAIN_LIST_FOCUS}), - SingleTextRow(""), ] - template.extend(assemble_rows( - [[SelectableText(key, maps=get_map("main_list_yellow")), - SelectableText(command, maps=get_map("main_list_lg"))] - for key, command in self.global_keybinds.items()], - ignore_columns=[1], dividechars=3)) if self.buffer.keybinds: template += [ - SingleTextRow(""), SingleTextRow("Buffer-specific Keybindings", maps={"normal": "main_list_white", "focus": MAIN_LIST_FOCUS}), SingleTextRow(""), @@ -54,6 +45,18 @@ def refresh(self): for key, command in self.buffer.keybinds.items()], ignore_columns=[1], dividechars=3)) + template += [ + SingleTextRow(""), + SingleTextRow("Global Keybindings", + maps={"normal": "main_list_white", "focus": MAIN_LIST_FOCUS}), + SingleTextRow("") + ] + template.extend(assemble_rows( + [[SelectableText(key, maps=get_map("main_list_yellow")), + SelectableText(command, maps=get_map("main_list_lg"))] + for key, command in self.global_keybinds.items()], + ignore_columns=[1], dividechars=3)) + self.set_body(template) self.set_focus(0)