summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-07 19:46:43 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-07 19:46:43 +0100
commit1c0bdd8c8549f71a70090a2be0bb17d12c66ea03 (patch)
tree470432e237bf250c35410def0e95676f5a03bb92 /src/buffer.cc
parent4495aefea672256685b09346f36fa51cb8e2af18 (diff)
Run BufCreate hook *before* Buf{Open,New}File
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 14821f79..1a92b8da 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -107,6 +107,8 @@ void Buffer::on_registered()
options().register_watcher(*this);
+ run_hook_in_own_context("BufCreate", m_name);
+
if (m_flags & Flags::File)
{
if (m_flags & Buffer::Flags::New)
@@ -118,8 +120,6 @@ void Buffer::on_registered()
}
}
- run_hook_in_own_context("BufCreate", m_name);
-
for (auto& option : options().flatten_options())
on_option_changed(*option);
}