+ docs

On Thu, Nov 22, 2012 at 9:46 AM, Andy Wokula <[email protected]> wrote:

> Am 22.11.2012 07:27, schrieb Christian Brabandt:
>
>  On Thu, November 22, 2012 04:42, Nate Soares wrote:
>>
>>> Here's a patch that adds the "stay" argument to the :function command.
>>> Thoughts?
>>>
>>
>> That is nice.
>>
>> ,----[ :h todo.txt ]-
>> | ":function f(x) keepjumps" creates a function where every command is
>> | executed like it has ":keepjumps" before it.
>> `----
>>
>> I wonder, if one should combine the keepjumps and stay functions into one
>> special argument or make 2 of it.
>>
>
> No.
>
> E.g. you want to make a change at the cursor position and
> take [range] lines into account to compute the change.
> And you don't want :keepjumps for it.
>
> Even without use case:
> "Sooner or later, everyone wants everything as an option."
> The new `stay' argument is an example for it!
> So, `no' again ^^.
>
> --
> 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<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
diff -r b1b18442cf4b runtime/doc/eval.txt
--- a/runtime/doc/eval.txt      Tue Nov 20 17:55:10 2012 +0100
+++ b/runtime/doc/eval.txt      Thu Nov 22 22:32:06 2012 -0800
@@ -6503,7 +6503,7 @@
 See |:verbose-cmd| for more information.
 
                                                        *E124* *E125* *E853*
-:fu[nction][!] {name}([arguments]) [range] [abort] [dict]
+:fu[nction][!] {name}([arguments]) [range] [stay] [abort] [dict]
                        Define a new function by the name {name}.  The name
                        must be made of alphanumeric characters and '_', and
                        must start with a capital or "s:" (see above).
@@ -6533,6 +6533,10 @@
                        each line in the range, with the cursor on the start
                        of each line.  See |function-range-example|.
 
+                       When the [stay] argument is added, the cursor will not
+                       jump to "a:firstline" before entering the function.
+                       This only has an effect when used with [range].
+
                        When the [abort] argument is added, the function will
                        abort as soon as an error is detected.
 
diff -r b1b18442cf4b runtime/syntax/help.vim
--- a/runtime/syntax/help.vim   Tue Nov 20 17:55:10 2012 +0100
+++ b/runtime/syntax/help.vim   Thu Nov 22 22:32:06 2012 -0800
@@ -63,6 +63,7 @@
 syn match helpSpecial          "<[SCM]-.>"
 syn match helpNormal           "<---*>"
 syn match helpSpecial          "\[range]"
+syn match helpSpecial          "\[stay]"
 syn match helpSpecial          "\[line]"
 syn match helpSpecial          "\[count]"
 syn match helpSpecial          "\[offset]"

Raspunde prin e-mail lui