aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_session.c')
-rw-r--r--src/nvim/ex_session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c
index fb37bc86f1..0e5d2fe4f5 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.
@@ -1135,7 +1138,7 @@ static char *get_view_file(char c)
}
*s++ = '=';
*s++ = c;
- xstrlcpy(s, ".vim", 5);
+ xmemcpyz(s, S_LEN(".vim"));
xfree(sname);
return retval;