aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-07-23 10:12:05 +0800
committerckelsel <ckelsel@hotmail.com>2017-07-23 10:34:41 +0800
commitad07e9c7fcabeb991f0849c9e11b5b225cf470fd (patch)
treee2d669b869ea9a6ab56c457fa314dd273e0c1b8a /src/nvim/window.c
parent253f6f3bbfd16b7aeb2f72714c1d5d1c88a3478a (diff)
downloadrneovim-ad07e9c7fcabeb991f0849c9e11b5b225cf470fd.tar.gz
rneovim-ad07e9c7fcabeb991f0849c9e11b5b225cf470fd.tar.bz2
rneovim-ad07e9c7fcabeb991f0849c9e11b5b225cf470fd.zip
vim-patch:8.0.0069
Problem: Compiler warning for self-comparison. Solution: Define ONE_WINDOW and add vim/vim#ifdef. https://github.com/vim/vim/commit/a1f4cb93ba50ea9e40cd4b1f5592b8a6d1398660
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 29f5412ba0..7517d4e120 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -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;