Am 20.11.2012 20:14, schrieb Nate Soares:
In that case I'd like to make a feature request for a way to handle
functions with ranges without moving the cursor. My suggestion would be
adding a [save] argument to :function which calls winsaveview() before
entering and winrestview() after exiting the function, as this has
potential applications beyond just [range] functions.

Thoughts on the proposed api?

Could you say more on your use case?

Earlier you said mappings are not involved -- it should be easy to pass
line numbers as function arguments ... but you don't want that -- why?

Why can't you just surround winsaveview()/winrestview()?

Normally, winsaveview()/winrestview() is only done once, at the top-level ...
why introducing more unnecessary winsaveview()/winrestview() actions
with nested function calls?

What's wrong with :KeepView (btw, it's prepared for nesting)?

--
Andy

--
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

Raspunde prin e-mail lui