0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #6927)
This commit is contained in:
Bram Moolenaar
2020-09-10 19:25:05 +02:00
parent a953b5cf4f
commit 4f25b1aba0
10 changed files with 40 additions and 22 deletions

View File

@@ -8389,6 +8389,7 @@ find_cmdline_var(char_u *src, int *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
@@ -8606,7 +8607,8 @@ eval_vars(
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