aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 07d3561990..c7d2dcb602 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3798,7 +3798,8 @@ static void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
int indir = (int)options[opt_idx].indir;
const LastSet last_set = { .script_ctx =
- { script_ctx.sc_sid, sourcing_lnum }, current_channel_id };
+ { script_ctx.sc_sid, script_ctx.sc_lnum + sourcing_lnum },
+ current_channel_id };
// Remember where the option was set. For local options need to do that
// in the buffer or window structure.