Window have it's own hooks manager
This commit is contained in:
parent
945ad361fb
commit
c38f244c06
|
@ -466,7 +466,7 @@ IncrementalInserter::~IncrementalInserter()
|
||||||
m_window.push_selections();
|
m_window.push_selections();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GlobalHooksManager::instance().run_hook("WinInsertEnd", "", Context(m_window));
|
m_window.hooks_manager().run_hook("InsertEnd", "", Context(m_window));
|
||||||
}
|
}
|
||||||
catch (runtime_error& e) {}
|
catch (runtime_error& e) {}
|
||||||
m_window.pop_selections();
|
m_window.pop_selections();
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "highlighter_group.hh"
|
#include "highlighter_group.hh"
|
||||||
#include "filter.hh"
|
#include "filter.hh"
|
||||||
#include "idvaluemap.hh"
|
#include "idvaluemap.hh"
|
||||||
|
#include "hooks_manager.hh"
|
||||||
|
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
@ -114,6 +115,8 @@ public:
|
||||||
void push_selections();
|
void push_selections();
|
||||||
void pop_selections();
|
void pop_selections();
|
||||||
|
|
||||||
|
HooksManager& hooks_manager() { return m_hooks_manager; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class Buffer;
|
friend class Buffer;
|
||||||
|
|
||||||
|
@ -140,6 +143,8 @@ private:
|
||||||
|
|
||||||
HighlighterGroup m_highlighters;
|
HighlighterGroup m_highlighters;
|
||||||
idvaluemap<std::string, FilterFunc> m_filters;
|
idvaluemap<std::string, FilterFunc> m_filters;
|
||||||
|
|
||||||
|
HooksManager m_hooks_manager;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IncrementalInserter
|
class IncrementalInserter
|
||||||
|
|
Loading…
Reference in New Issue
Block a user