aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-29 19:39:18 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-04-29 21:19:45 +0200
commit04f0bc97b732c395dbfcc9411910ab58b9346f58 (patch)
treed1aa1ca90dbeecdd146ff58b035b0d2b20a445e6 /runtime
parent035a41c21827e616ec2abba581329bea4201da88 (diff)
downloadrneovim-04f0bc97b732c395dbfcc9411910ab58b9346f58.tar.gz
rneovim-04f0bc97b732c395dbfcc9411910ab58b9346f58.tar.bz2
rneovim-04f0bc97b732c395dbfcc9411910ab58b9346f58.zip
vim-patch:8.1.0401: can't get swap name of another buffer
Problem: Can't get swap name of another buffer. Solution: Add swapname(). (Ozaki Kiichi, closes vim/vim#3441) https://github.com/vim/vim/commit/110bd60985c31e8978e9b071e2179f4233ef8557
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 3553174d9f..56e0a57816 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2322,6 +2322,7 @@ submatch({nr} [, {list}]) String or List
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
swapinfo({fname}) Dict information about swap file {fname}
+swapname({expr}) String swap file of buffer {expr}
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
@@ -7777,6 +7778,13 @@ swapinfo({fname}) swapinfo()
Not a swap file: does not contain correct block ID
Magic number mismatch: Info in first block is invalid
+swapname({expr}) *swapname()*
+ The result is the swap file path of the buffer {expr}.
+ For the use of {expr}, see |bufname()| above.
+ If buffer {expr} is the current buffer, the result is equal to
+ |:swapname| (unless no swap file).
+ If buffer {expr} has no swap file, returns an empty string.
+
synID({lnum}, {col}, {trans}) *synID()*
The result is a Number, which is the syntax ID at the position
{lnum} and {col} in the current window.