Add BufReload hook which is triggered on buffer reload
This commit is contained in:
parent
f6d3501802
commit
ae6c214f52
|
@ -283,6 +283,8 @@ void Client::reload_buffer()
|
|||
reload_file_buffer(buffer);
|
||||
context().print_status({ format("'{}' reloaded", buffer.display_name()),
|
||||
context().faces()["Information"] });
|
||||
|
||||
m_window->hooks().run_hook("BufReload", buffer.name(), context());
|
||||
}
|
||||
catch (runtime_error& error)
|
||||
{
|
||||
|
|
|
@ -801,7 +801,7 @@ const CommandDesc remove_highlighter_cmd = {
|
|||
};
|
||||
|
||||
static constexpr auto hooks = {
|
||||
"BufCreate", "BufNewFile", "BufOpenFile", "BufClose", "BufWritePost",
|
||||
"BufCreate", "BufNewFile", "BufOpenFile", "BufClose", "BufWritePost", "BufReload",
|
||||
"BufWritePre", "BufOpenFifo", "BufCloseFifo", "BufReadFifo", "BufSetOption",
|
||||
"InsertBegin", "InsertChar", "InsertDelete", "InsertEnd", "InsertIdle", "InsertKey",
|
||||
"InsertMove", "InsertCompletionHide", "InsertCompletionShow", "InsertCompletionSelect",
|
||||
|
|
Loading…
Reference in New Issue
Block a user