summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-22 22:18:17 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-22 22:18:17 +0200
commit64b4d73524b9a2304d89b87529cd8d3cef14b856 (patch)
tree23357c484e9ae935c37d16872d5468fd56bbb546 /runtime
parent448262176b382c63bd2faa9a1354670a4eede36b (diff)
patch 8.1.1911: more functions can be used as methodsv8.1.1911
Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f50cefe39c..1cafba2436 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3299,7 +3299,11 @@ byte2line({byte}) *byte2line()*
for the current buffer. The first character has byte count
one.
Also see |line2byte()|, |go| and |:goto|.
- {not available when compiled without the |+byte_offset|
+
+ Can also be used as a |method|: >
+ GetOffset()->byte2line()
+
+< {not available when compiled without the |+byte_offset|
feature}
byteidx({expr}, {nr}) *byteidx()*
@@ -3323,6 +3327,9 @@ byteidx({expr}, {nr}) *byteidx()*
If there are exactly {nr} characters the length of the string
in bytes is returned.
+ Can also be used as a |method|: >
+ GetName()->byteidx(idx)
+
byteidxcomp({expr}, {nr}) *byteidxcomp()*
Like byteidx(), except that a composing character is counted
as a separate character. Example: >
@@ -3336,6 +3343,9 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
Only works different from byteidx() when 'encoding' is set to
a Unicode encoding.
+ Can also be used as a |method|: >
+ GetName()->byteidxcomp(idx)
+
call({func}, {arglist} [, {dict}]) *call()* *E699*
Call function {func} with the items in |List| {arglist} as
arguments.
@@ -3345,6 +3355,9 @@ call({func}, {arglist} [, {dict}]) *call()* *E699*
{dict} is for functions with the "dict" attribute. It will be
used to set the local variable "self". |Dictionary-function|
+ Can also be used as a |method|: >
+ GetFunc()->call([arg, arg], dict)
+
ceil({expr}) *ceil()*
Return the smallest integral value greater than or equal to
{expr} as a |Float| (round up).