Skip to content

Instantly share code, notes, and snippets.

@mattn
Created May 2, 2012 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/2578755 to your computer and use it in GitHub Desktop.
Save mattn/2578755 to your computer and use it in GitHub Desktop.
diff -r 8201108e9cf0 src/eval.c
--- a/src/eval.c Tue May 01 21:14:34 2012 +0200
+++ b/src/eval.c Thu May 03 03:00:30 2012 +0900
@@ -10110,7 +10110,7 @@
l1 = argvars[0].vval.v_list;
l2 = argvars[1].vval.v_list;
if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)_(arg_errmsg))
- && l2 != NULL)
+ && l2 != NULL && l1 != l2)
{
if (argvars[2].v_type != VAR_UNKNOWN)
{
@@ -10149,7 +10149,7 @@
d1 = argvars[0].vval.v_dict;
d2 = argvars[1].vval.v_dict;
if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)_(arg_errmsg))
- && d2 != NULL)
+ && d2 != NULL && d1 != d2)
{
/* Check the third argument. */
if (argvars[2].v_type != VAR_UNKNOWN)
@@ -10191,7 +10191,7 @@
EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
break;
}
- else if (*action == 'f')
+ else if (*action == 'f' && HI2DI(hi2) != di1)
{
clear_tv(&di1->di_tv);
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment