Jürgen wrote:

[...]
> > Thank you Jürgen. It indeed hinges on the editexisting plugin. The 
> > following .vimrc.light should reproduce the issue:
> > 
> > ==
> > set nocompatible
> > filetype plugin indent on
> > syntax enable
> > 
> > runtime! macros/editexisting.vim
> > 
> > cnoremap <expr> / getcmdtype() == '/' ? '\/' : '/'
> > nnoremap : ,
> > ==
> > 
> > Both mappings are necessary to confuse Vim.
> 
> apart from the fact that the second mapping is a really bad idea (have
> you tried :q to quit Vim?) it seems that it's also responsible for the
> behavior you see. When I removed the last line from your ~/.vimrc.light
> the following two commands showed the desired behavior: the cursor is on
> line 1 after executing
> 
>   gvim -n -u ~/.vimrc.light -U NONE --servername GVIMTEST +5 file.txt
>   gvim -n -u ~/.vimrc.light -U NONE --servername GVIMTEST +1 file.txt
> 
> (Note that I didn't source ~/.gvimrc.light, because it's superfluous.)
> 
> That behavior is with GVim 7.4.540 (32-bit) on Windows 7 (64-bit). Your
> mileage with a different version on a different OS may vary.
> 
> Further testing showed that the combination of line 115 in
> editexisting.vim with your second mapping is responsible for the
> misbehaving of Vim.
> 
> If you change that line to
> 
>   exe "normal! " . a:command
> 
> (note the additional exclamation mark) the cursor is positioned
> correctly even when the colon has been mapped.
> 
> @Bram: Any chance you might include that change in the distributed
> editexisting.vim?

I suppose it's a good idea.

-- 
OLD WOMAN: Well, how did you become king, then?
ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
        held Excalibur aloft from the bosom of the water to signify by Divine
        Providence ...  that I, Arthur, was to carry Excalibur ...  That is
        why I am your king!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui