Matchit uses a sequence of commands to move the cursor to its final
position.  It should keep intermediate positions out of the jumplist.

---

This is the first time I am submitting a patch.  I've attached it as a
separate file. Let me know if I should prepare it differently.

Best,
  Steffen

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim
index 74c1a1e..0a4cc4d 100644
--- a/runtime/macros/matchit.vim
+++ b/runtime/macros/matchit.vim
@@ -257,8 +257,8 @@ function! s:Match_wrapper(word, forward, mode) range
   let restore_cursor = virtcol(".") . "|"
   normal! g0
   let restore_cursor = line(".") . "G" .  virtcol(".") . "|zs" . restore_cursor
-  normal! H
-  let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
+  keepjumps normal! H
+  let restore_cursor = "keepjumps normal!" . line(".") . "Gzt" . restore_cursor
   execute restore_cursor
   call cursor(0, curcol + 1)
   " normal! 0
@@ -700,8 +700,8 @@ fun! s:MultiMatch(spflag, mode)
   let restore_cursor = virtcol(".") . "|"
   normal! g0
   let restore_cursor = line(".") . "G" .  virtcol(".") . "|zs" . restore_cursor
-  normal! H
-  let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
+  keepjumps normal! H
+  let restore_cursor = "keepjumps normal!" . line(".") . "Gzt" . restore_cursor
   execute restore_cursor
 
   " Third step: call searchpair().

Raspunde prin e-mail lui