summaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/window.c b/src/window.c
index ad1852e4f4..52c458e033 100644
--- a/src/window.c
+++ b/src/window.c
@@ -119,12 +119,8 @@ log_frame_layout(frame_T *frame)
win_T *
prevwin_curwin(void)
{
- return
-#ifdef FEAT_CMDWIN
- // In cmdwin, the alternative buffer should be used.
- is_in_cmdwin() && prevwin != NULL ? prevwin :
-#endif
- curwin;
+ // In cmdwin, the alternative buffer should be used.
+ return is_in_cmdwin() && prevwin != NULL ? prevwin : curwin;
}
/*
@@ -149,8 +145,7 @@ do_window(
if (ERROR_IF_ANY_POPUP_WINDOW)
return;
-#ifdef FEAT_CMDWIN
-# define CHECK_CMDWIN \
+#define CHECK_CMDWIN \
do { \
if (cmdwin_type != 0) \
{ \
@@ -158,9 +153,6 @@ do_window(
return; \
} \
} while (0)
-#else
-# define CHECK_CMDWIN do { /**/ } while (0)
-#endif
Prenum1 = Prenum == 0 ? 1 : Prenum;
@@ -2963,10 +2955,9 @@ win_free_all(void)
{
int dummy;
-#ifdef FEAT_CMDWIN
// avoid an error for switching tabpage with the cmdline window open
cmdwin_type = 0;
-#endif
+
while (first_tabpage->tp_next != NULL)
tabpage_close(TRUE);
@@ -4019,13 +4010,11 @@ win_new_tabpage(int after)
tabpage_T *newtp;
int n;
-#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
{
emsg(_(e_invalid_in_cmdline_window));
return FAIL;
}
-#endif
newtp = alloc_tabpage();
if (newtp == NULL)
@@ -5513,7 +5502,6 @@ shell_new_columns(void)
#endif
}
-#if defined(FEAT_CMDWIN) || defined(PROTO)
/*
* Save the size of all windows in "gap".
*/
@@ -5567,7 +5555,6 @@ win_size_restore(garray_T *gap)
(void)win_comp_pos();
}
}
-#endif // FEAT_CMDWIN
/*
* Update the position for all windows, using the width and height of the
@@ -6419,10 +6406,9 @@ win_fix_cursor(int normal)
if (wp->w_buffer->b_ml.ml_line_count < wp->w_height)
return;
-#ifdef FEAT_CMDWIN
if (skip_win_fix_cursor)
return;
-#endif
+
// Determine valid cursor range.
so = MIN(wp->w_height / 2, so);
wp->w_cursor.lnum = wp->w_topline;