Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repeat#wrap hides undo/redo messages #27

Closed
wilywampa opened this issue Oct 5, 2014 · 2 comments
Closed

repeat#wrap hides undo/redo messages #27

wilywampa opened this issue Oct 5, 2014 · 2 comments

Comments

@wilywampa
Copy link
Contributor

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
blueyed added a commit to blueyed/vim-repeat that referenced this issue Nov 5, 2014
@blueyed
Copy link

blueyed commented Nov 5, 2014

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

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

@justinmk
Copy link
Contributor

Addressed by #33.

@tpope tpope closed this as completed May 16, 2018
This was referenced Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants