diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-01-26 16:57:09 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-02-02 16:31:49 +0100 |
commit | 2405cf82552e93eb3d5441d2f109647b97af5521 (patch) | |
tree | 3d7e26596607e61a16c5f63ac27163d56f6507bd /src/nvim/edit.c | |
parent | 2c01e79dc47ff83e0af118fb3fee50fa2ff7fcf2 (diff) | |
download | rneovim-2405cf82552e93eb3d5441d2f109647b97af5521.tar.gz rneovim-2405cf82552e93eb3d5441d2f109647b97af5521.tar.bz2 rneovim-2405cf82552e93eb3d5441d2f109647b97af5521.zip |
vim-patch:8.1.0792: bad display if opening cmdline window from Insert completion
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index b39ec58ffe..a63dd97ba8 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -7132,11 +7132,17 @@ static void ins_reg(void) * message for it. Only call it explicitly. */ ++no_u_sync; if (regname == '=') { - /* Sync undo when evaluating the expression calls setline() or - * append(), so that it can be undone separately. */ + pos_T curpos = curwin->w_cursor; + + // Sync undo when evaluating the expression calls setline() or + // append(), so that it can be undone separately. u_sync_once = 2; regname = get_expr_register(); + + // Cursor may be moved back a column. + curwin->w_cursor = curpos; + check_cursor(); } if (regname == NUL || !valid_yank_reg(regname, false)) { vim_beep(BO_REG); |