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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c
index 14dac9a126..f6fd6df5ad 100644
--- a/src/nvim/ex_session.c
+++ b/src/nvim/ex_session.c
@@ -384,6 +384,17 @@ static int put_view(
xfree(fname_esc);
}
+ if (wp->w_alt_fnum) {
+ buf_T *const alt = buflist_findnr(wp->w_alt_fnum);
+
+ // Set the alternate file.
+ if (alt != NULL && alt->b_fname != NULL && *alt->b_fname != NUL
+ && (fputs("balt ", fd) < 0
+ || ses_fname(fd, alt, flagp, true) == FAIL)) {
+ return FAIL;
+ }
+ }
+
//
// Local mappings and abbreviations.
//