patch 9.0.0263: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Make some functions always available.
diff --git a/src/session.c b/src/session.c
index fb9d140..ddf5d21 100644
--- a/src/session.c
+++ b/src/session.c
@@ -148,11 +148,8 @@
&& term_should_restore(wp->w_buffer);
#endif
if (wp->w_buffer->b_fname == NULL
-#ifdef FEAT_QUICKFIX
// When 'buftype' is "nofile" can't restore the window contents.
- || bt_nofilename(wp->w_buffer)
-#endif
- )
+ || bt_nofilename(wp->w_buffer))
return (ssop_flags & SSOP_BLANK);
if (bt_help(wp->w_buffer))
return (ssop_flags & SSOP_HELP);
@@ -374,10 +371,7 @@
# endif
// Load the file.
else if (wp->w_buffer->b_ffname != NULL
-# ifdef FEAT_QUICKFIX
- && !bt_nofilename(wp->w_buffer)
-# endif
- )
+ && !bt_nofilename(wp->w_buffer))
{
// Editing a file in this buffer: use ":edit file".
// This may have side effects! (e.g., compressed or network file).
@@ -708,11 +702,9 @@
{
if (!(only_save_windows && buf->b_nwindows == 0)
&& !(buf->b_help && !(ssop_flags & SSOP_HELP))
-#ifdef FEAT_TERMINAL
// Skip terminal buffers: finished ones are not useful, others
// will be resurrected and result in a new buffer.
&& !bt_terminal(buf)
-#endif
&& buf->b_fname != NULL
&& buf->b_p_bl)
{
@@ -818,10 +810,7 @@
if (ses_do_win(wp)
&& wp->w_buffer->b_ffname != NULL
&& !bt_help(wp->w_buffer)
-#ifdef FEAT_QUICKFIX
- && !bt_nofilename(wp->w_buffer)
-#endif
- )
+ && !bt_nofilename(wp->w_buffer))
{
if (need_tabnext && put_line(fd, "tabnext") == FAIL)
goto fail;