From 1c0bdd8c8549f71a70090a2be0bb17d12c66ea03 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 7 Jun 2017 19:46:43 +0100 Subject: [PATCH] Run BufCreate hook *before* Buf{Open,New}File --- src/buffer.cc | 4 ++-- 1 file 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); }