From 2e1217da4617c832afcd7ca90c88b06c200dc23b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 9 Nov 2016 12:08:49 +0100 Subject: 'inccommand': buftype=nofile, restore cursor/view - Use a standard scratch buffer instead of a new 'buftype', functions like curbufIsChanged() already have special handling for scratch bufs. - Cleanup some stuff from the previous merge. - Add support for :smagic, :snomagic. Closes #5578 --- src/nvim/undo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/undo.c') diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 2f4317980a..d6428d63f7 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1685,7 +1685,8 @@ void u_redo(int count) u_doit(count, false); } -/// undo, and remove the undo branch from the undo tree. +/// Undo and remove the branch from the undo tree. +/// Also moves the cursor (as a "normal" undo would). bool u_undo_and_forget(int count) { if (curbuf->b_u_synced == false) { -- cgit