edit: Fix strange code

Based on the flow it looks like ptr could not be NULL here: if ptr_arg is NULL 
ptr is compl_leader, if compl_leader is NULL function exits. This also applies 
to Vim as far as I see.
This commit is contained in:
ZyX
2017-04-16 19:38:16 +03:00
parent 4f0fc1f06a
commit 9e9ba14e0e

View File

@@ -3427,10 +3427,11 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
len -= (*mb_head_off)(p, p + len);
for (p += len; *p != NUL; mb_ptr_adv(p))
AppendCharToRedobuff(K_BS);
} else
} else {
len = 0;
if (ptr != NULL)
AppendToRedobuffLit(ptr + len, -1);
}
assert(ptr != NULL);
AppendToRedobuffLit(ptr + len, -1);
}
/*