diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-03-30 09:58:18 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-03-30 09:58:18 +1100 |
| commit | 0baf562c93670d90369ef99828bccc94a9d92520 (patch) | |
| tree | 6cd4e9691840748170775fcd14d87a1e45ce4469 /src/client.cc | |
| parent | 510be03910081f320fae600629f23591f4fc207c (diff) | |
Support full redraws during shell execution and handle resize there
Fixes #1973
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/client.cc b/src/client.cc index 225a10b2..6520dc9c 100644 --- a/src/client.cc +++ b/src/client.cc @@ -47,6 +47,11 @@ Client::Client(std::unique_ptr<UserInterface>&& ui, m_ui->set_on_key([this](Key key) { if (key == ctrl('c')) killpg(getpgrp(), SIGINT); + else if (key.modifiers == Key::Modifiers::Resize) + { + m_window->set_dimensions(m_ui->dimensions()); + force_redraw(); + } else m_pending_keys.push_back(key); }); @@ -83,11 +88,6 @@ bool Client::process_pending_inputs() context().hooks().run_hook("FocusIn", context().name(), context()); else if (key == Key::FocusOut) context().hooks().run_hook("FocusOut", context().name(), context()); - else if (key.modifiers == Key::Modifiers::Resize) - { - m_window->set_dimensions(m_ui->dimensions()); - force_redraw(); - } else m_input_handler.handle_key(key); @@ -103,18 +103,10 @@ bool Client::process_pending_inputs() return not keys.empty(); } -void Client::print_status(DisplayLine status_line, bool immediate) +void Client::print_status(DisplayLine status_line) { m_status_line = std::move(status_line); - if (immediate) - { - m_ui->draw_status(m_status_line, m_mode_line, get_face("StatusLine")); - m_ui->refresh(true); - } - else - { - m_ui_pending |= StatusLine; - } + m_ui_pending |= StatusLine; } |
