fix(mapset): remove existing abbreviation of same lhs (#20320)

This commit is contained in:
zeertzjq
2022-09-24 21:07:18 +08:00
committed by GitHub
parent db056de29a
commit 291a649632
2 changed files with 21 additions and 3 deletions

View File

@@ -2199,7 +2199,7 @@ void f_mapset(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
MapArguments unmap_args = MAP_ARGUMENTS_INIT;
set_maparg_lhs_rhs(lhs, strlen(lhs), "", 0, LUA_NOREF, 0, &unmap_args);
unmap_args.buffer = buffer;
buf_do_map(MAPTYPE_UNMAP, &unmap_args, mode, false, curbuf);
buf_do_map(MAPTYPE_UNMAP, &unmap_args, mode, is_abbr, curbuf);
xfree(unmap_args.rhs);
xfree(unmap_args.orig_rhs);