comparison src/if_tcl.c @ 34234:daaff6843090 v9.1.0062

patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines Commit: https://github.com/vim/vim/commit/e99f0688785c3d56b1ee45a28fa6ce02b850a33b Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Jan 29 19:32:39 2024 +0100 patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines 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>
author Christian Brabandt <cb@256bit.org>
date Mon, 29 Jan 2024 19:45:06 +0100
parents 1a769647d661
children
comparison
equal deleted inserted replaced
34233:a2c41411d97b 34234:daaff6843090
2010 if (err != TCL_OK 2010 if (err != TCL_OK
2011 || Tcl_InterpDeleted(tclinfo.interp) 2011 || Tcl_InterpDeleted(tclinfo.interp)
2012 #if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8 2012 #if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8
2013 || Tcl_LimitExceeded(tclinfo.interp) 2013 || Tcl_LimitExceeded(tclinfo.interp)
2014 #endif 2014 #endif
2015 || curbuf != was_curbuf) 2015 || curbuf != was_curbuf
2016 || (linenr_T)rs > curbuf->b_ml.ml_line_count)
2016 break; 2017 break;
2017 line = (char *)Tcl_GetVar(tclinfo.interp, var_line, 0); 2018 line = (char *)Tcl_GetVar(tclinfo.interp, var_line, 0);
2018 if (line) 2019 if (line)
2019 { 2020 {
2020 if (ml_replace((linenr_T)rs, (char_u *)line, TRUE) != OK) 2021 if (ml_replace((linenr_T)rs, (char_u *)line, TRUE) != OK)