aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt17
-rw-r--r--runtime/doc/testing.txt8
2 files changed, 20 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 511d072366..5754742c6d 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2929,18 +2929,22 @@ bufwinid({expr}) *bufwinid()*
<
Only deals with the current tab page.
+ Can also be used as a |method|: >
+ FindBuffer()->bufwinid()
+
bufwinnr({expr}) *bufwinnr()*
- The result is a Number, which is the number of the first
- window associated with buffer {expr}. For the use of {expr},
- see |bufname()| above. If buffer {expr} doesn't exist or
- there is no such window, -1 is returned. Example: >
+ Like |bufwinid()| but return the window number instead of the
+ |window-ID|.
+ If buffer {expr} doesn't exist or there is no such window, -1
+ is returned. Example: >
echo "A window containing buffer 1 is " . (bufwinnr(1))
< The number can be used with |CTRL-W_w| and ":wincmd w"
|:wincmd|.
- Only deals with the current tab page.
+ Can also be used as a |method|: >
+ FindBuffer()->bufwinnr()
byte2line({byte}) *byte2line()*
Return the line number that contains the character at byte
@@ -9619,6 +9623,9 @@ winbufnr({nr}) The result is a Number, which is the number of the buffer
Example: >
:echo "The file in the current window is " . bufname(winbufnr(0))
<
+ Can also be used as a |method|: >
+ FindWindow()->winbufnr()->bufname()
+<
*wincol()*
wincol() The result is a Number, which is the virtual column of the
cursor in the window. This is counting screen cells from the
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index fc841dfc9c..3b59dfa908 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -83,6 +83,9 @@ assert_equalfile({fname-one}, {fname-two})
When {fname-one} or {fname-two} does not exist the error will
mention that.
+ Can also be used as a |method|: >
+ GetLog()->assert_equalfile('expected.log')
+
assert_exception({error} [, {msg}]) *assert_exception()*
When v:exception does not contain the string {error} an error
message is added to |v:errors|. Also see |assert-return|.
@@ -172,10 +175,15 @@ assert_notmatch({pattern}, {actual} [, {msg}])
Can also be used as a |method|: >
getFile()->assert_notmatch('bar.*')
+
assert_report({msg}) *assert_report()*
Report a test failure directly, using {msg}.
Always returns one.
+ Can also be used as a |method|: >
+ GetMessage()->assert_report()
+
+
assert_true({actual} [, {msg}]) *assert_true()*
When {actual} is not true an error message is added to
|v:errors|, like with |assert_equal()|.