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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 1d3cfcd..6495db6 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8389,6 +8389,7 @@
* '<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 @@
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