aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-14 07:07:32 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-15 10:14:53 +0800
commited65724e57d2af13cedc380ecfe4a495dae3afb7 (patch)
tree377f8659f94e379c12e3db944680375aeed2ef3c /src/nvim/ex_docmd.c
parent98ab0bb5f7d2138be0b6019769e237e42aafad1a (diff)
downloadrneovim-ed65724e57d2af13cedc380ecfe4a495dae3afb7.tar.gz
rneovim-ed65724e57d2af13cedc380ecfe4a495dae3afb7.tar.bz2
rneovim-ed65724e57d2af13cedc380ecfe4a495dae3afb7.zip
vim-patch:8.2.1653: expand('<stack>') does not include the final line number
Problem: Expand('<stack>') does not include the final line number. Solution: Add the line nuber. (closes vim/vim#6927) https://github.com/vim/vim/commit/4f25b1aba050b85fa97ca2316aa04dd4b0b22530
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 34768f62a9..de62d90610 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -7719,6 +7719,7 @@ ssize_t find_cmdline_var(const char_u *src, size_t *usedlen)
/// '<cexpr>' to C-expression under the cursor
/// '<cfile>' to path name under the cursor
/// '<sfile>' to sourced file name
+/// '<stack>' to call stack
/// '<slnum>' to sourced file line number
/// '<afile>' to file name for autocommand
/// '<abuf>' to buffer number for autocommand
@@ -7913,7 +7914,7 @@ char_u *eval_vars(char_u *src, char_u *srcstart, size_t *usedlen, linenr_T *lnum
case SPEC_SFILE: // file name for ":so" command
case SPEC_STACK: // call stack
- result = estack_sfile(spec_idx == SPEC_SFILE);
+ result = estack_sfile(spec_idx == SPEC_SFILE ? ESTACK_SFILE : ESTACK_STACK);
if (result == NULL) {
*errormsg = spec_idx == SPEC_SFILE
? _("E498: no :source file name to substitute for \"<sfile>\"")