mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-19 09:21:30 +03:00
call compute_lines before hooks at Buffer construction
This commit is contained in:
parent
bc3d20bf2a
commit
c4ad372d91
@ -27,13 +27,12 @@ Buffer::Buffer(const std::string& name, Type type,
|
||||
m_content(initial_content), m_last_save_undo_index(0)
|
||||
{
|
||||
BufferManager::instance().register_buffer(this);
|
||||
compute_lines();
|
||||
|
||||
if (type == Type::NewFile)
|
||||
GlobalHooksManager::instance().run_hook("BufCreate", name, Context(*this));
|
||||
else if (type == Type::File)
|
||||
GlobalHooksManager::instance().run_hook("BufOpen", name, Context(*this));
|
||||
|
||||
compute_lines();
|
||||
}
|
||||
|
||||
Buffer::~Buffer()
|
||||
|
Loading…
Reference in New Issue
Block a user