summaryrefslogtreecommitdiff
path: root/src/context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/context.cc')
-rw-r--r--src/context.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/context.cc b/src/context.cc
index 513bd6cb..49a64f7d 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -75,6 +75,15 @@ HookManager& Context::hooks() const
return GlobalHooks::instance();
}
+KeymapManager& Context::keymaps() const
+{
+ if (has_window())
+ return window().keymaps();
+ if (has_buffer())
+ return buffer().keymaps();
+ return GlobalKeymaps::instance();
+}
+
void Context::print_status(DisplayLine status) const
{
if (has_client())