diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-06-12 18:27:57 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-06-12 18:27:57 +0000 |
| commit | bc359d7c902a8131801fc78a415dc0a0b396807a (patch) | |
| tree | 3f3b3af70264e38a0ef98423d93e4e9e80a12812 /src/buffer.cc | |
| parent | 20315eac859168238ad5228a910df499a0510164 (diff) | |
BufCreate hook is always called for every buffer, BufNew is called when creating a new file
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index a1f943e8..59ece2ae 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -34,9 +34,11 @@ Buffer::Buffer(const String& name, Type type, apply_modification(Modification::make_insert(begin(), initial_content)); if (type == Type::NewFile) - m_hook_manager.run_hook("BufCreate", name, Context(*this)); + m_hook_manager.run_hook("BufNew", name, Context(*this)); else if (type == Type::File) m_hook_manager.run_hook("BufOpen", name, Context(*this)); + + m_hook_manager.run_hook("BufCreate", name, Context(*this)); } Buffer::~Buffer() |
