diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 273e4cf0c0..b9becebbf4 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5075,9 +5075,7 @@ set_bool_option ( /* There can be only one window with 'previewwindow' set. */ else if ((int *)varp == &curwin->w_p_pvw) { if (curwin->w_p_pvw) { - win_T *win; - - for (win = firstwin; win != NULL; win = win->w_next) { + FOR_ALL_WINDOWS(win) { if (win->w_p_pvw && win != curwin) { curwin->w_p_pvw = FALSE; return (char_u *)N_("E590: A preview window already exists"); |