Add a WinClose hook
This commit is contained in:
parent
29ab42149c
commit
90d499b94d
|
@ -529,6 +529,7 @@ existing hooks are:
|
||||||
* +InsertMove+: The cursor moved (without inserting) in insert mode, the key
|
* +InsertMove+: The cursor moved (without inserting) in insert mode, the key
|
||||||
that triggered the move is used for filtering
|
that triggered the move is used for filtering
|
||||||
* +WinCreate+: A window was created, the filtering text is the buffer name
|
* +WinCreate+: A window was created, the filtering text is the buffer name
|
||||||
|
* +WinClose+: A window was detroyed, 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
|
||||||
* +WinSetOption+: An option was set in a window context, the filtering text
|
* +WinSetOption+: An option was set in a window context, the filtering text
|
||||||
|
|
|
@ -36,6 +36,8 @@ Window::Window(Buffer& buffer)
|
||||||
|
|
||||||
Window::~Window()
|
Window::~Window()
|
||||||
{
|
{
|
||||||
|
Context hook_context{*this};
|
||||||
|
m_hooks.run_hook("WinClose", buffer().name(), hook_context);
|
||||||
m_options.unregister_watcher(*this);
|
m_options.unregister_watcher(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user