diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-10-26 18:51:25 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-10-26 18:51:25 +0100 |
| commit | 90d499b94de727953c49556811f3c1a39930d494 (patch) | |
| tree | 1faf8777dfcff881b9a3bdea29b2cbde50cf7e12 | |
| parent | 29ab42149cf0f5c9cb629878cb29417fd9f298cc (diff) | |
Add a WinClose hook
| -rw-r--r-- | README.asciidoc | 1 | ||||
| -rw-r--r-- | src/window.cc | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/README.asciidoc b/README.asciidoc index 3a1c8255..fee80380 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -529,6 +529,7 @@ existing hooks are: * +InsertMove+: The cursor moved (without inserting) in insert mode, the key that triggered the move is used for filtering * +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 name * +WinSetOption+: An option was set in a window context, the filtering text diff --git a/src/window.cc b/src/window.cc index 2fdec0f8..5bf9cede 100644 --- a/src/window.cc +++ b/src/window.cc @@ -36,6 +36,8 @@ Window::Window(Buffer& buffer) Window::~Window() { + Context hook_context{*this}; + m_hooks.run_hook("WinClose", buffer().name(), hook_context); m_options.unregister_watcher(*this); } |
