aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-06 20:01:28 +0800
committerGitHub <noreply@github.com>2024-12-06 20:01:28 +0800
commite9f4ceeb7467364554ecef770fd3380e89457abb (patch)
treea1a224f25606e50d665dc4c7fee3b6b1b147dd2b /runtime/doc/api.txt
parent812d02970206d5a65819e076bcddedd92e083a19 (diff)
downloadrneovim-e9f4ceeb7467364554ecef770fd3380e89457abb.tar.gz
rneovim-e9f4ceeb7467364554ecef770fd3380e89457abb.tar.bz2
rneovim-e9f4ceeb7467364554ecef770fd3380e89457abb.zip
fix(events): don't expand `args.file` for Lua callback (#31473)
Problem: In an autocommand Lua callback whether `args.file` is expanded depends on whether `expand('<afile>')` has been called. Solution: Always use the unexpanded file name for `args.file`. Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but at least makes `args.file` have a consistent value.
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 9cb8f72348..cb3b2a3f77 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -3494,9 +3494,9 @@ nvim_create_autocmd({event}, {opts}) *nvim_create_autocmd()*
• event: (string) name of the triggered event
|autocmd-events|
• group: (number|nil) autocommand group id, if any
- • match: (string) expanded value of <amatch>
- • buf: (number) expanded value of <abuf>
- • file: (string) expanded value of <afile>
+ • file: (string) <afile> (not expanded to a full path)
+ • match: (string) <amatch> (expanded to a full path)
+ • buf: (number) <abuf>
• data: (any) arbitrary data passed from
|nvim_exec_autocmds()| *event-data*
• command (string) optional: Vim command to execute on event.