mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mapping
Problem: Undo misbehaves when writing from an insert mode mapping.
Solution: Sync undo when writing. (closes vim/vim#11674)
3f8f827723
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -908,6 +908,12 @@ check_pum:
|
||||
}
|
||||
pum_want.active = false;
|
||||
}
|
||||
|
||||
if (curbuf->b_u_synced) {
|
||||
// The K_EVENT, K_COMMAND, or K_LUA caused undo to be synced.
|
||||
// Need to save the line for undo before inserting the next char.
|
||||
ins_need_undo = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case K_HOME: // <Home>
|
||||
|
Reference in New Issue
Block a user