mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user