mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-22 11:01:48 +03:00
Tweak buffer change code so that WinDisplay hooks can use info boxes
This commit is contained in:
parent
3a0d9481ac
commit
468bd63569
@ -179,9 +179,9 @@ void Client::change_buffer(Buffer& buffer)
|
||||
context().selections_write_only() = std::move(ws.selections);
|
||||
context().set_window(*m_window);
|
||||
m_window->set_dimensions(m_ui->dimensions());
|
||||
force_redraw();
|
||||
|
||||
m_window->hooks().run_hook("WinDisplay", buffer.name(), context());
|
||||
force_redraw();
|
||||
}
|
||||
|
||||
static bool is_inline(InfoStyle style)
|
||||
|
@ -148,18 +148,19 @@ void Context::change_buffer(Buffer& buffer)
|
||||
if (m_edition_level > 0)
|
||||
this->buffer().commit_undo_group();
|
||||
|
||||
m_window.reset();
|
||||
if (has_client())
|
||||
{
|
||||
client().change_buffer(buffer);
|
||||
client().info_hide();
|
||||
client().menu_hide();
|
||||
}
|
||||
else
|
||||
m_selections = SelectionList{buffer, Selection{}};
|
||||
|
||||
if (has_input_handler())
|
||||
input_handler().reset_normal_mode();
|
||||
|
||||
m_window.reset();
|
||||
if (has_client())
|
||||
{
|
||||
client().info_hide();
|
||||
client().menu_hide();
|
||||
client().change_buffer(buffer);
|
||||
}
|
||||
else
|
||||
m_selections = SelectionList{buffer, Selection{}};
|
||||
}
|
||||
|
||||
SelectionList& Context::selections()
|
||||
|
Loading…
Reference in New Issue
Block a user