From 74898120ed82b399aea1b0ade56392cb4d54555c Mon Sep 17 00:00:00 2001 From: Delapouite Date: Thu, 21 Dec 2017 22:22:33 +0100 Subject: [PATCH] Add session name filtering for KakBegin hook --- doc/pages/hooks.asciidoc | 2 +- src/main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/pages/hooks.asciidoc b/doc/pages/hooks.asciidoc index 94008c7b..0dfa6fc1 100644 --- a/doc/pages/hooks.asciidoc +++ b/doc/pages/hooks.asciidoc @@ -123,7 +123,7 @@ of the given *group*. *InputModeChange* `:`:: Triggered whenever the current input mode changes -*KakBegin*:: +*KakBegin* `session name`:: kakoune has started, this hook is called just after reading the user configuration files diff --git a/src/main.cc b/src/main.cc index a112edce..9d8079ef 100644 --- a/src/main.cc +++ b/src/main.cc @@ -618,7 +618,7 @@ int run_server(StringView session, StringView server_init, { Context empty_context{Context::EmptyContextFlag{}}; - global_scope.hooks().run_hook("KakBegin", "", empty_context); + global_scope.hooks().run_hook("KakBegin", session, empty_context); } if (not files.empty()) try