aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-07 18:09:39 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-08-12 22:35:24 +0100
commit56b56a76e8294a319d2db32581f82421d4a4d446 (patch)
treedff3b9fb678cc5cc23e346c3199a5bb6843d9704 /runtime/doc
parent7925f0b6330c18c9391d02f844cd17b41fbb3d2e (diff)
downloadrneovim-56b56a76e8294a319d2db32581f82421d4a4d446.tar.gz
rneovim-56b56a76e8294a319d2db32581f82421d4a4d446.tar.bz2
rneovim-56b56a76e8294a319d2db32581f82421d4a4d446.zip
vim-patch:8.1.1911: more functions can be used as methods
Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method. https://github.com/vim/vim/commit/64b4d73524b9a2304d89b87529cd8d3cef14b856 Note that the old-style version of Test_byteidx() was already translated to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions, using Test_byteidx() to mainly test the method call syntax for byteidx() and byteidxcomp().
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5754742c6d..5cf0c0d239 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2954,6 +2954,9 @@ byte2line({byte}) *byte2line()*
one.
Also see |line2byte()|, |go| and |:goto|.
+ Can also be used as a |method|: >
+ GetOffset()->byte2line()
+
byteidx({expr}, {nr}) *byteidx()*
Return byte index of the {nr}'th character in the string
{expr}. Use zero for the first character, it then returns
@@ -2976,6 +2979,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: >
@@ -2989,6 +2995,9 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
Only works differently 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.
@@ -2998,6 +3007,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).