Skip to content

repeat#wrap hides undo/redo messages #27

Closed

Description

@wilywampa

With regular u/<C-r> Vim echoes some information about the undo state, e.g. 1 change; before #11 12:30:44. That message isn't displayed if the undo comes from the normal command, e.g. exe 'norm! u'. feedkeys('u', 'n') does display the message, so this is my proposed fix:

diff --git a/autoload/repeat.vim b/autoload/repeat.vim
index 18b1280..c69a63f 100644
--- a/autoload/repeat.vim
+++ b/autoload/repeat.vim
@@ -97,7 +97,8 @@ endfunction

 function! repeat#wrap(command,count)
     let preserve = (g:repeat_tick == b:changedtick)
-    exe 'norm! '.(a:count ? a:count : '').a:command . (&foldopen =~# 'undo' ? 'zv' : '')
+    call feedkeys((a:count ? a:count : '').a:command, 'n')
+    exe (&foldopen =~# 'undo' ? 'norm! zv' : '')
     if preserve
         let g:repeat_tick = b:changedtick
     endif

Activity

  1. blueyed commented on Nov 5, 2014

    @blueyed

    👍
    Came here to report the issue and this patch works. Thanks!

    I've created a PR with it: #29.

  2. justinmk commented on May 16, 2018

    @justinmk
    Contributor

    Addressed by #33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions