Mercurial > vim
comparison src/if_perl.xs @ 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 | 6733c5359e8a |
children |
comparison
equal
deleted
inserted
replaced
34233:a2c41411d97b | 34234:daaff6843090 |
---|---|
1366 break; | 1366 break; |
1367 sv_setpv(GvSV(PL_defgv), (char *)ml_get(i)); | 1367 sv_setpv(GvSV(PL_defgv), (char *)ml_get(i)); |
1368 PUSHMARK(sp); | 1368 PUSHMARK(sp); |
1369 perl_call_pv("VIM::perldo", G_SCALAR | G_EVAL); | 1369 perl_call_pv("VIM::perldo", G_SCALAR | G_EVAL); |
1370 str = SvPV(GvSV(PL_errgv), length); | 1370 str = SvPV(GvSV(PL_errgv), length); |
1371 if (length || curbuf != was_curbuf) | 1371 if (length || curbuf != was_curbuf || i > curbuf->b_ml.ml_line_count) |
1372 break; | 1372 break; |
1373 SPAGAIN; | 1373 SPAGAIN; |
1374 if (SvTRUEx(POPs)) | 1374 if (SvTRUEx(POPs)) |
1375 { | 1375 { |
1376 if (replace_line(&i, &eap->line2) != OK) | 1376 if (replace_line(&i, &eap->line2) != OK) |