mirror of
https://github.com/neovim/neovim.git
synced 2026-05-02 12:04:58 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user