vim-patch:8.0.0069

Problem:    Compiler warning for self-comparison.
Solution:   Define ONE_WINDOW and add vim/vim#ifdef.

a1f4cb93ba
This commit is contained in:
ckelsel
2017-07-23 10:12:05 +08:00
parent 253f6f3bbf
commit ad07e9c7fc
9 changed files with 14 additions and 13 deletions

View File

@@ -193,7 +193,7 @@ newwindow:
/* cursor to previous window with wrap around */
case 'W':
CHECK_CMDWIN
if (firstwin == lastwin && Prenum != 1) /* just one window */
if (ONE_WINDOW && Prenum != 1) /* just one window */
beep_flush();
else {
if (Prenum) { /* go to specified window */
@@ -1271,7 +1271,7 @@ static void win_rotate(int upwards, int count)
frame_T *frp;
int n;
if (firstwin == lastwin) { /* nothing to do */
if (ONE_WINDOW) { /* nothing to do */
beep_flush();
return;
}
@@ -2194,7 +2194,7 @@ winframe_remove (
/*
* If there is only one window there is nothing to remove.
*/
if (tp == NULL ? firstwin == lastwin : tp->tp_firstwin == tp->tp_lastwin)
if (tp == NULL ? ONE_WINDOW : tp->tp_firstwin == tp->tp_lastwin)
return NULL;
/*
@@ -2331,7 +2331,7 @@ win_altframe (
frame_T *frp;
int b;
if (tp == NULL ? firstwin == lastwin : tp->tp_firstwin == tp->tp_lastwin)
if (tp == NULL ? ONE_WINDOW : tp->tp_firstwin == tp->tp_lastwin)
/* Last window in this tab page, will go to next tab page. */
return alt_tabpage()->tp_curwin->w_frame;