diff options
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index ab7add1c5b..1117b6fbcf 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5188,13 +5188,12 @@ static void ex_close(exarg_T *eap) */ static void ex_pclose(exarg_T *eap) { - win_T *win; - - for (win = firstwin; win != NULL; win = win->w_next) + FOR_ALL_WINDOWS(win) { if (win->w_p_pvw) { ex_win_close(eap->forceit, win, NULL); break; } + } } /* @@ -5505,6 +5504,7 @@ void alist_new(void) { curwin->w_alist = xmalloc(sizeof(*curwin->w_alist)); curwin->w_alist->al_refcount = 1; + curwin->w_alist->id = ++max_alist_id; alist_init(curwin->w_alist); } @@ -6119,7 +6119,6 @@ static void ex_swapname(exarg_T *eap) */ static void ex_syncbind(exarg_T *eap) { - win_T *wp; win_T *save_curwin = curwin; buf_T *save_curbuf = curbuf; long topline; @@ -6133,15 +6132,17 @@ static void ex_syncbind(exarg_T *eap) */ if (curwin->w_p_scb) { topline = curwin->w_topline; - for (wp = firstwin; wp; wp = wp->w_next) { + FOR_ALL_WINDOWS(wp) { if (wp->w_p_scb && wp->w_buffer) { y = wp->w_buffer->b_ml.ml_line_count - p_so; - if (topline > y) + if (topline > y) { topline = y; + } } } - if (topline < 1) + if (topline < 1) { topline = 1; + } } else { topline = 1; } @@ -8859,7 +8860,7 @@ static void ex_match(exarg_T *eap) c = *end; *end = NUL; - match_add(curwin, g, p + 1, 10, id); + match_add(curwin, g, p + 1, 10, id, NULL); free(g); *end = c; } |