1
0
forked from aniani/vim

patch 8.2.0690: line number of option set by modeline is wrong

Problem:    Line number of option set by modeline is wrong.
Solution:   Do not double the line number. (Ozaki Kiichi, closes #6035)
This commit is contained in:
Bram Moolenaar
2020-05-03 17:19:33 +02:00
parent a38b2b737e
commit 5125874951
3 changed files with 61 additions and 1 deletions

View File

@@ -2460,7 +2460,9 @@ set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
int indir = (int)options[opt_idx].indir;
sctx_T new_script_ctx = script_ctx;
new_script_ctx.sc_lnum += SOURCING_LNUM;
// Modeline already has the line number set.
if (!(opt_flags & OPT_MODELINE))
new_script_ctx.sc_lnum += SOURCING_LNUM;
// Remember where the option was set. For local options need to do that
// in the buffer or window structure.