From 77458e613b67b9e7607ae781bcfbdc2ff6b1b2ef Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 27 Mar 2024 05:41:41 +0800 Subject: vim-patch:9.1.0207: No autocommand when writing session file (#28048) Problem: No autocommand when writing session file Solution: Add SessionWritePost autocommand (Colin Kennedy) fixes: vim/vim#14242 closes: vim/vim#14288 https://github.com/vim/vim/commit/e5f2280381250801a28dcff9823e6f94e7b163fc Co-authored-by: Colin Kennedy --- src/nvim/ex_session.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/ex_session.c') diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index fb37bc86f1..416f18ccc5 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -12,6 +12,7 @@ #include "nvim/arglist.h" #include "nvim/arglist_defs.h" #include "nvim/ascii_defs.h" +#include "nvim/autocmd.h" #include "nvim/buffer.h" #include "nvim/buffer_defs.h" #include "nvim/eval.h" @@ -1092,6 +1093,8 @@ void ex_mkrc(exarg_T *eap) } xfree(viewFile); + + apply_autocmds(EVENT_SESSIONWRITEPOST, NULL, NULL, false, curbuf); } /// @return the name of the view file for the current buffer. -- cgit