vim-patch:8.1.1084: cannot delete a match from another window (#12325)

Problem:    Cannot delete a match from another window. (Paul Jolly)
Solution:   Add window ID argument to matchdelete(), clearmatches(),
            getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178)
aff749145e
This commit is contained in:
Shougo
2020-05-16 22:25:51 +09:00
committed by GitHub
parent f3d0a1741e
commit d7d69fed18
5 changed files with 80 additions and 25 deletions

View File

@@ -63,6 +63,7 @@ static char *e_missbrac = N_("E111: Missing ']'");
static char *e_dictrange = N_("E719: Cannot use [:] with a Dictionary");
static char *e_illvar = N_("E461: Illegal variable name: %s");
static char *e_cannot_mod = N_("E995: Cannot modify existing variable");
static char *e_invalwindow = N_("E957: Invalid window number");
// TODO(ZyX-I): move to eval/executor
static char *e_letwrong = N_("E734: Wrong variable type for %s=");
@@ -6776,7 +6777,7 @@ int matchadd_dict_arg(typval_T *tv, const char **conceal_char,
if ((di = tv_dict_find(tv->vval.v_dict, S_LEN("window"))) != NULL) {
*win = find_win_by_nr_or_id(&di->di_tv);
if (*win == NULL) {
EMSG(_("E957: Invalid window number"));
EMSG(_(e_invalwindow));
return FAIL;
}
}