parent
d4e9f30e5f
commit
a132eb6b5b
|
@ -1303,6 +1303,7 @@ existing hooks are:
|
|||
* `WinClose`: A window was destroyed, the filtering text is the buffer name
|
||||
* `WinDisplay`: A window was bound a client, the filtering text is the buffer
|
||||
name
|
||||
* `WinResize`: A window resized, the filtering text is '<line>.<column>'
|
||||
* `WinSetOption`: An option was set in a window context, the filtering text
|
||||
is '<option_name>=<new_value>'
|
||||
* `BufSetOption`: An option was set in a buffer context, the filtering text
|
||||
|
|
|
@ -111,7 +111,7 @@ const DisplayBuffer& Window::update_display_buffer(const Context& context)
|
|||
DisplayBuffer::LineList& lines = m_display_buffer.lines();
|
||||
lines.clear();
|
||||
|
||||
m_dimensions = context.client().dimensions();
|
||||
set_dimensions(context.client().dimensions());
|
||||
if (m_dimensions == CharCoord{0,0})
|
||||
return m_display_buffer;
|
||||
|
||||
|
@ -149,7 +149,12 @@ void Window::set_position(CharCoord position)
|
|||
|
||||
void Window::set_dimensions(CharCoord dimensions)
|
||||
{
|
||||
if (m_dimensions != dimensions)
|
||||
{
|
||||
m_dimensions = dimensions;
|
||||
run_hook_in_own_context("WinResize", format("{}.{}", dimensions.line,
|
||||
dimensions.column));
|
||||
}
|
||||
}
|
||||
|
||||
static LineCount adapt_view_pos(LineCount line, LineCount offset,
|
||||
|
|
Loading…
Reference in New Issue
Block a user