aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/vimfn.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-01-03 20:12:15 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-01-07 09:15:10 +0800
commitd5308637bf1aac2b97fccf73a0ffdef304eaa1d6 (patch)
treeacb03c837290a225f1fcb7f73b4ae1306d1e7589 /runtime/lua/vim/_meta/vimfn.lua
parent06ff5480ce274daf3b7ad9950a587099200dc8ff (diff)
downloadrneovim-d5308637bf1aac2b97fccf73a0ffdef304eaa1d6.tar.gz
rneovim-d5308637bf1aac2b97fccf73a0ffdef304eaa1d6.tar.bz2
rneovim-d5308637bf1aac2b97fccf73a0ffdef304eaa1d6.zip
vim-patch:9.1.0984: exception handling can be improved
Problem: exception handling can be improved Solution: add v:stacktrace and getstacktrace() closes: vim/vim#16360 https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6 Co-authored-by: ichizok <gclient.gaap@gmail.com> Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 6662fca84f..3de8b9951c 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -3770,6 +3770,20 @@ function vim.fn.getregtype(regname) end
--- @return vim.fn.getscriptinfo.ret[]
function vim.fn.getscriptinfo(opts) end
+--- Returns the current stack trace of Vim scripts.
+--- Stack trace is a |List|, of which each item is a |Dictionary|
+--- with the following items:
+--- funcref The funcref if the stack is at the function,
+--- otherwise this item is not exist.
+--- event The string of the event description if the
+--- stack is at autocmd event, otherwise this item
+--- is not exist.
+--- lnum The line number of the script on the stack.
+--- filepath The file path of the script on the stack.
+---
+--- @return table[]
+function vim.fn.getstacktrace() end
+
--- If {tabnr} is not specified, then information about all the
--- tab pages is returned as a |List|. Each List item is a
--- |Dictionary|. Otherwise, {tabnr} specifies the tab page