aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-08-27 17:35:54 +0200
committerJurica Bradaric <jbradaric@gmail.com>2016-10-07 17:07:16 +0200
commitd8079e5ab7c9cb029db35f725333ea95d515e337 (patch)
tree8b0dc4646bf28b183ee8986726f3611e006e9e78 /runtime
parentb6300742d2063373b1bf1adee03a97dd3190f069 (diff)
downloadrneovim-d8079e5ab7c9cb029db35f725333ea95d515e337.tar.gz
rneovim-d8079e5ab7c9cb029db35f725333ea95d515e337.tar.bz2
rneovim-d8079e5ab7c9cb029db35f725333ea95d515e337.zip
vim-patch:7.4.1893
Problem: Cannot easily get the window ID for a buffer. Solution: Add bufwinid(). https://github.com/vim/vim/commit/b3619a90eae2702553ff9494ecc4c9b20c13c224
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index df5713c63d..1e04be50ed 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1813,6 +1813,7 @@ buflisted({expr}) Number TRUE if buffer {expr} is listed
bufloaded({expr}) Number TRUE if buffer {expr} is loaded
bufname({expr}) String Name of the buffer {expr}
bufnr({expr} [, {create}]) Number Number of the buffer {expr}
+bufwinid({expr}) Number window ID of buffer {expr}
bufwinnr({expr}) Number window number of buffer {expr}
byte2line({byte}) Number line number at byte count {byte}
byteidx({expr}, {nr}) Number byte index of {nr}'th char in {expr}
@@ -2468,6 +2469,16 @@ bufnr({expr} [, {create}])
number necessarily exist, because ":bwipeout" may have removed
them. Use bufexists() to test for the existence of a buffer.
+bufwinid({expr}) *bufwinid()*
+ The result is a Number, which is the window ID 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: >
+
+ echo "A window containing buffer 1 is " . (bufwinid(1))
+<
+ Only deals with the current tab page.
+
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},