# HG changeset patch # User Bram Moolenaar # Date 1540466105 -7200 # Node ID d65790af8514658aac4977274750854b6e7fbab8 # Parent 0d072760c18279002cc42c29510437fd2f690d37 patch 8.1.0494: functions do not check for a window ID in other tabs commit https://github.com/vim/vim/commit/babfcf54ae9bf9570eddf4958a553635cd589e21 Author: Bram Moolenaar Date: Thu Oct 25 13:11:16 2018 +0200 patch 8.1.0494: functions do not check for a window ID in other tabs Problem: Functions do not check for a window ID in other tabs. Solution: Also find the window ID in other than the current tab. diff --git a/src/evalfunc.c b/src/evalfunc.c --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5291,7 +5291,7 @@ f_getloclist(typval_T *argvars UNUSED, t #ifdef FEAT_QUICKFIX win_T *wp; - wp = find_win_by_nr(&argvars[0], NULL); + wp = find_win_by_nr_or_id(&argvars[0]); get_qf_loc_list(FALSE, wp, &argvars[1], rettv); #endif } @@ -5796,7 +5796,7 @@ f_win_screenpos(typval_T *argvars, typva if (rettv_list_alloc(rettv) == FAIL) return; - wp = find_win_by_nr(&argvars[0], NULL); + wp = find_win_by_nr_or_id(&argvars[0]); list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_winrow + 1); list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1); } @@ -8028,7 +8028,7 @@ matchadd_dict_arg(typval_T *tv, char_u * if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL) { - *win = find_win_by_nr(&di->di_tv, NULL); + *win = find_win_by_nr_or_id(&di->di_tv); if (*win == NULL) { EMSG(_("E957: Invalid window number")); @@ -10785,7 +10785,7 @@ f_setloclist(typval_T *argvars, typval_T rettv->vval.v_number = -1; - win = find_win_by_nr(&argvars[0], NULL); + win = find_win_by_nr_or_id(&argvars[0]); if (win != NULL) set_qf_ll_list(win, &argvars[1], &argvars[2], &argvars[3], rettv); } @@ -13843,7 +13843,7 @@ f_winbufnr(typval_T *argvars, typval_T * { win_T *wp; - wp = find_win_by_nr(&argvars[0], NULL); + wp = find_win_by_nr_or_id(&argvars[0]); if (wp == NULL) rettv->vval.v_number = -1; else @@ -13868,7 +13868,7 @@ f_winheight(typval_T *argvars, typval_T { win_T *wp; - wp = find_win_by_nr(&argvars[0], NULL); + wp = find_win_by_nr_or_id(&argvars[0]); if (wp == NULL) rettv->vval.v_number = -1; else @@ -14035,7 +14035,7 @@ f_winwidth(typval_T *argvars, typval_T * { win_T *wp; - wp = find_win_by_nr(&argvars[0], NULL); + wp = find_win_by_nr_or_id(&argvars[0]); if (wp == NULL) rettv->vval.v_number = -1; else diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -793,6 +793,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 494, +/**/ 493, /**/ 492,