diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-09-16 19:15:13 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-09-16 19:15:13 +0100 |
| commit | 06e06d6ea67f10ececd7232471505e7d8f36d509 (patch) | |
| tree | 478b39028f534bb6b89b16ffcffa54c83c61b3c2 /src/commands.cc | |
| parent | 49903523a7f28c18d324bf605876b9d18a97047b (diff) | |
remove print_status from UserInterface, pass status line to draw
Client store the current status line. This way calls to print status
do not force the user interface to display directly.
Diffstat (limited to 'src/commands.cc')
| -rw-r--r-- | src/commands.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/commands.cc b/src/commands.cc index 0f772dd8..bad02704 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -540,8 +540,6 @@ void declare_option(CommandParameters params, Context& context) class DraftUI : public UserInterface { public: - void print_status(const DisplayLine&) override {} - void menu_show(memoryview<String>, DisplayCoord, ColorPair, ColorPair, MenuStyle) override {} void menu_select(int) override {} void menu_hide() override {} @@ -549,7 +547,7 @@ public: void info_show(const String&, DisplayCoord, ColorPair, MenuStyle) override {} void info_hide() override {} - void draw(const DisplayBuffer&, const DisplayLine&) override {} + void draw(const DisplayBuffer&, const DisplayLine&, const DisplayLine&) override {} DisplayCoord dimensions() override { return {0,0}; } bool is_key_available() override { return false; } Key get_key() override { return 'a'; } @@ -571,8 +569,7 @@ void context_wrap(CommandParameters params, Context& context, Func func) { Editor& editor = real_context.editor(); Client client(std::unique_ptr<UserInterface>(new DraftUI()), editor, - real_context.has_client() ? - real_context.client().name() : ""); + real_context.has_client() ? real_context.client().name() : ""); DynamicSelectionList sels{editor.buffer(), editor.selections()}; auto restore_sels = on_scope_end([&]{ editor.select(sels); }); func(parser, client.context()); |
