diff src/ex_getln.c @ 14700:0a3b9ecf7cb8 v8.1.0362

patch 8.1.0362: cannot get the script line number when executing a function commit https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 10 21:05:02 2018 +0200 patch 8.1.0362: cannot get the script line number when executing a function Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes #3362) Also display the line number with ":verbose set".
author Christian Brabandt <cb@256bit.org>
date Mon, 10 Sep 2018 21:15:07 +0200
parents 2982a54aa304
children fd69edd2c67e
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5591,7 +5591,7 @@ call_user_expand_func(
 {
     int		keep = 0;
     typval_T	args[4];
-    int		save_current_SID = current_SID;
+    sctx_T	save_current_sctx = current_sctx;
     char_u	*pat = NULL;
     void	*ret;
     struct cmdline_info	    save_ccline;
@@ -5621,12 +5621,12 @@ call_user_expand_func(
     save_ccline = ccline;
     ccline.cmdbuff = NULL;
     ccline.cmdprompt = NULL;
-    current_SID = xp->xp_scriptID;
+    current_sctx = xp->xp_script_ctx;
 
     ret = user_expand_func(xp->xp_arg, 3, args);
 
     ccline = save_ccline;
-    current_SID = save_current_SID;
+    current_sctx = save_current_sctx;
     if (ccline.cmdbuff != NULL)
 	ccline.cmdbuff[ccline.cmdlen] = keep;