From 4f5e09fa4da232503e6871ce66ea94ff1d6bfe44 Mon Sep 17 00:00:00 2001 From: nosami Date: Wed, 3 May 2017 12:02:11 +0100 Subject: [PATCH] 'u' should undo atomic. Fixes #24 --- XSVim.Tests/MiscTests.fs | 6 +++++- XSVim/XSVim.fs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/XSVim.Tests/MiscTests.fs b/XSVim.Tests/MiscTests.fs index 497768e..22de635 100644 --- a/XSVim.Tests/MiscTests.fs +++ b/XSVim.Tests/MiscTests.fs @@ -29,4 +29,8 @@ module ``Miscellaneous tests`` = [] let ``'I' should insert at first non whitespace``() = - assertText " abcdef$" "I" " |abcdef" \ No newline at end of file + assertText " abcdef$" "I" " |abcdef" + + [] + let ``Undo repeat``() = + assertText "a$bc def ghi" "3dwu" "a$bc def ghi" \ No newline at end of file diff --git a/XSVim/XSVim.fs b/XSVim/XSVim.fs index a676820..7875b15 100755 --- a/XSVim/XSVim.fs +++ b/XSVim/XSVim.fs @@ -545,6 +545,8 @@ module Vim = match command.repeat with | Some r -> r | None -> 1 + + use _group = editor.OpenUndoGroup() processCommands count vimState let (|Digit|_|) character =