1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 08:23:05 +03:00

Run BufCreate hook *before* Buf{Open,New}File

This commit is contained in:
Maxime Coste 2017-06-07 19:46:43 +01:00
parent 4495aefea6
commit 1c0bdd8c85

View File

@ -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);
}