diff --git a/src/client.cc b/src/client.cc index 313011d0..7baf551b 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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) { diff --git a/src/commands.cc b/src/commands.cc index b8223508..bc73f45c 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -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",