aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-01-07 09:42:17 +0800
committerGitHub <noreply@github.com>2025-01-07 09:42:17 +0800
commite27f7125d66f6026adacbbad00bbf6e66a6ba883 (patch)
treeeb2a65a2b975f9fcc56e41ee1db6fde66b58d3dd /src/nvim/eval.lua
parent06ff5480ce274daf3b7ad9950a587099200dc8ff (diff)
parent8fa4306eb910028ee8df8685ae9b1649608c2608 (diff)
downloadrneovim-e27f7125d66f6026adacbbad00bbf6e66a6ba883.tar.gz
rneovim-e27f7125d66f6026adacbbad00bbf6e66a6ba883.tar.bz2
rneovim-e27f7125d66f6026adacbbad00bbf6e66a6ba883.zip
Merge pull request #31893 from zeertzjq/vim-9.1.0984
vim-patch:9.1.{0984,0991}: getstacktrace(), v:stacktrace
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index c650dee306..4ce1960dcf 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -4670,6 +4670,25 @@ M.funcs = {
returns = 'vim.fn.getscriptinfo.ret[]',
signature = 'getscriptinfo([{opts}])',
},
+ getstacktrace = {
+ args = 0,
+ desc = [=[
+ 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 a function,
+ otherwise this item is omitted.
+ event The string of the event description if the
+ stack is at an autocmd event, otherwise this
+ item is omitted.
+ lnum The line number in the script on the stack.
+ filepath The file path of the script on the stack.
+ ]=],
+ name = 'getstacktrace',
+ params = {},
+ returns = 'table[]',
+ signature = 'getstacktrace()',
+ },
gettabinfo = {
args = { 0, 1 },
base = 1,