Window: call WinCreate hook on creation

This commit is contained in:
Maxime Coste 2011-11-26 18:39:59 +00:00
parent 9c117a821c
commit dd2896ecc8

View File

@ -2,6 +2,7 @@
#include "assert.hh" #include "assert.hh"
#include "filter_registry.hh" #include "filter_registry.hh"
#include "hooks_manager.hh"
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
@ -54,9 +55,12 @@ Window::Window(Buffer& buffer)
m_selections.push_back(Selection(buffer.begin(), buffer.begin())); m_selections.push_back(Selection(buffer.begin(), buffer.begin()));
FilterRegistry& registry = FilterRegistry::instance(); FilterRegistry& registry = FilterRegistry::instance();
HooksManager::instance().run_hook("WinCreate", buffer.name(),
Context(*this));
registry.add_filter_to_window(*this, "expand_tabs", FilterParameters()); registry.add_filter_to_window(*this, "expand_tabs", FilterParameters());
registry.add_filter_to_window(*this, "highlight_selections", FilterParameters()); registry.add_filter_to_window(*this, "highlight_selections", FilterParameters());
registry.add_filter_to_window(*this, "hlcpp", FilterParameters());
} }
void Window::check_invariant() const void Window::check_invariant() const