1
0
forked from aniani/vim

patch 9.0.0263: too many #ifdefs

Problem:    Too many #ifdefs.
Solution:   Make some functions always available.
This commit is contained in:
Bram Moolenaar
2022-08-25 15:11:15 +01:00
parent 2e6dcbc445
commit 6d4b2f54df
15 changed files with 27 additions and 117 deletions

View File

@@ -148,11 +148,8 @@ ses_do_win(win_T *wp)
&& 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 @@ put_view(
# 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 @@ makeopens(
{
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 @@ makeopens(
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;