diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-08-27 07:23:39 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-08-27 08:03:42 +1000 |
| commit | fe93a9df37bdc28ff6580cf9ece8d18bbe2663cf (patch) | |
| tree | 36e879ca26cc4f55f73695230e9d43268aafe298 /src/commands.cc | |
| parent | 6f9f32b4bb7603c308a3e245fef10ad48bf20719 (diff) | |
Remove Window::force_redraw()
This was mostly redundant with Client::force_redraw.
Diffstat (limited to 'src/commands.cc')
| -rw-r--r-- | src/commands.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands.cc b/src/commands.cc index 16d04f2d..fe986c42 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -976,20 +976,23 @@ static void redraw_relevant_clients(Context& context, StringView highlighter_pat { StringView scope{highlighter_path.begin(), find(highlighter_path, '/')}; if (scope == "window") - context.window().force_redraw(); + { + if (context.has_client()) + context.client().force_redraw(); + } else if (scope == "buffer" or prefix_match(scope, "buffer=")) { auto& buffer = scope == "buffer" ? context.buffer() : BufferManager::instance().get_buffer(scope.substr(7_byte)); for (auto&& client : ClientManager::instance()) { if (&client->context().buffer() == &buffer) - client->context().window().force_redraw(); + client->force_redraw(); } } else { for (auto&& client : ClientManager::instance()) - client->context().window().force_redraw(); + client->force_redraw(); } } |
