From c4ad372d91a527022c6feecafcf0a794d8832258 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 28 Feb 2012 14:23:52 +0000 Subject: [PATCH] call compute_lines before hooks at Buffer construction --- src/buffer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/buffer.cc b/src/buffer.cc index 1866009f..fe1f852d 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -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()