aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-21 15:22:05 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-21 15:22:05 -0500
commit44166a150c5f444aaa25fe687f0d15efe2dc11cb (patch)
tree778ba75361cc300ae03963ba08f58eed941a81c2 /src
parent81b68b0af3b3f01da40b966ef056bb53326a1b78 (diff)
parent4bd848f24ff883f67744da4141c090698ba997df (diff)
downloadrneovim-44166a150c5f444aaa25fe687f0d15efe2dc11cb.tar.gz
rneovim-44166a150c5f444aaa25fe687f0d15efe2dc11cb.tar.bz2
rneovim-44166a150c5f444aaa25fe687f0d15efe2dc11cb.zip
Merge pull request #4314 from justinmk/mksession_terminal
mksession: Restore buftype=terminal windows.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index dfae2b849d..13a298cc78 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -8774,19 +8774,18 @@ static int ses_do_frame(frame_T *fr)
return FALSE;
}
-/*
- * Return non-zero if window "wp" is to be stored in the Session.
- */
+/// Return non-zero if window "wp" is to be stored in the Session.
static int ses_do_win(win_T *wp)
{
if (wp->w_buffer->b_fname == NULL
- /* When 'buftype' is "nofile" can't restore the window contents. */
- || bt_nofile(wp->w_buffer)
- )
+ // When 'buftype' is "nofile" can't restore the window contents.
+ || (!wp->w_buffer->terminal && bt_nofile(wp->w_buffer))) {
return ssop_flags & SSOP_BLANK;
- if (wp->w_buffer->b_help)
+ }
+ if (wp->w_buffer->b_help) {
return ssop_flags & SSOP_HELP;
- return TRUE;
+ }
+ return true;
}
/*