summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-25 13:11:16 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-25 13:11:16 +0200
commitbabfcf54ae9bf9570eddf4958a553635cd589e21 (patch)
tree09e77233737c771a0f6b2e330de3e9ca036488cb
parente6e3989c1b3f18907a0c305712b867e9a3821369 (diff)
patch 8.1.0494: functions do not check for a window ID in other tabsv8.1.0494
Problem: Functions do not check for a window ID in other tabs. Solution: Also find the window ID in other than the current tab.
-rw-r--r--src/evalfunc.c14
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index b69752416f..82ea05af33 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5291,7 +5291,7 @@ f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
#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, typval_T *rettv)
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 **conceal_char, win_T **win)
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)
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 *rettv)
{
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 *rettv)
{
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 *rettv)
{
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
index 7900ee7418..7297ad59a9 100644
--- 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,