From 7568a9604b56074593078904ff928b46677d74d6 Mon Sep 17 00:00:00 2001 From: Christian Wellenbrock Date: Fri, 3 Apr 2015 12:30:43 +0200 Subject: [PATCH] Revert order of feedkeys calls to fix counts Since we are using the `i` flag, the feedkeys calls insert the keys instead of appending. That's why we need to insert the second part of the command before inserting the first part in front of it. --- autoload/repeat.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/repeat.vim b/autoload/repeat.vim index 142f1b8..0884dc6 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -92,8 +92,8 @@ function! repeat#run(count) if ((v:version == 703 && has('patch100')) || (v:version == 704 && !has('patch601'))) exe 'norm ' . r . cnt . s else - call feedkeys(r . cnt, 'ni') call feedkeys(s, 'i') + call feedkeys(r . cnt, 'ni') endif else if ((v:version == 703 && has('patch100')) || (v:version == 704 && !has('patch601')))