I also believe that the behavior should be changed. As Ingo pointed out, the documentation is ambiguous and if anything implies that the cursor should *not* be moved on functions with [range].
I doubt there are any plugins which depend upon this bug, and there is at least one (mine) which is hindered by it. As of now the functionality can be emulated with a command, but there is no way to create a function with [range] which saves and restores the view. That is a serious drawback. On Tue, Nov 20, 2012 at 8:48 AM, Christian Brabandt <[email protected]>wrote: > On Tue, November 20, 2012 17:46, Ingo Karkat wrote: > > I omit the range attribute on the function and explicitly pass the range > > in: > > #v+ > > function! s:Foo( firstLine, lastLine ) > > ... > > endfunction > > command! -range=% Foo call <SID>Foo(<line1>,<line2>) > > #v- > > Yes, that was what I meant initially. > > regards, > Christian > > -- > 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 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
