0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0341: undo does not work properly when using completion

Problem:    When using complete() and typing a character undo is saved after
            the character was inserted. (Shougo)
Solution:   Save for undo before inserting the character.
This commit is contained in:
Bram Moolenaar
2017-02-19 15:26:18 +01:00
parent 5acff71d3b
commit d56a79d339
3 changed files with 26 additions and 0 deletions

View File

@@ -3583,7 +3583,11 @@ ins_compl_addleader(int c)
{
#ifdef FEAT_MBYTE
int cc;
#endif
if (stop_arrow() == FAIL)
return;
#ifdef FEAT_MBYTE
if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
{
char_u buf[MB_MAXBYTES + 1];