diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-01-29 19:32:39 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-01-29 19:32:39 +0100 |
commit | e99f0688785c3d56b1ee45a28fa6ce02b850a33b (patch) | |
tree | af86efdd7f5addf6e142e5f40712877429a60dff /src/if_tcl.c | |
parent | e6d8b4662ddf9356da53f56e363b67b524fd8825 (diff) |
patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete linesv9.1.0062
Problem: Internal error when :luado/perldo/pydo etc delete lines
Solution: Test that the line is still valid line number
(zeertzjq)
closes: #13931
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/if_tcl.c')
-rw-r--r-- | src/if_tcl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/if_tcl.c b/src/if_tcl.c index d3d46395ec..eab321bd92 100644 --- a/src/if_tcl.c +++ b/src/if_tcl.c @@ -2012,7 +2012,8 @@ ex_tcldo(exarg_T *eap) #if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8 || Tcl_LimitExceeded(tclinfo.interp) #endif - || curbuf != was_curbuf) + || curbuf != was_curbuf + || (linenr_T)rs > curbuf->b_ml.ml_line_count) break; line = (char *)Tcl_GetVar(tclinfo.interp, var_line, 0); if (line) |