mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-15 14:11:43 +03:00
parent
d4e9f30e5f
commit
a132eb6b5b
@ -1303,6 +1303,7 @@ existing hooks are:
|
|||||||
* `WinClose`: A window was destroyed, the filtering text is the buffer name
|
* `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
|
* `WinDisplay`: A window was bound a client, the filtering text is the buffer
|
||||||
name
|
name
|
||||||
|
* `WinResize`: A window resized, the filtering text is '<line>.<column>'
|
||||||
* `WinSetOption`: An option was set in a window context, the filtering text
|
* `WinSetOption`: An option was set in a window context, the filtering text
|
||||||
is '<option_name>=<new_value>'
|
is '<option_name>=<new_value>'
|
||||||
* `BufSetOption`: An option was set in a buffer context, the filtering text
|
* `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();
|
DisplayBuffer::LineList& lines = m_display_buffer.lines();
|
||||||
lines.clear();
|
lines.clear();
|
||||||
|
|
||||||
m_dimensions = context.client().dimensions();
|
set_dimensions(context.client().dimensions());
|
||||||
if (m_dimensions == CharCoord{0,0})
|
if (m_dimensions == CharCoord{0,0})
|
||||||
return m_display_buffer;
|
return m_display_buffer;
|
||||||
|
|
||||||
@ -149,7 +149,12 @@ void Window::set_position(CharCoord position)
|
|||||||
|
|
||||||
void Window::set_dimensions(CharCoord dimensions)
|
void Window::set_dimensions(CharCoord dimensions)
|
||||||
{
|
{
|
||||||
m_dimensions = 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,
|
static LineCount adapt_view_pos(LineCount line, LineCount offset,
|
||||||
|
Loading…
Reference in New Issue
Block a user