1
0
forked from aniani/vim

patch 9.1.0546: vim-tiny fails on CTRL-X/CTRL-A

Problem:  vim-tiny fails on CTRL-X/CTRL-A
          (Rob Foehl, after 9.1.0172)
Solution: Move #ifdefs, so that after changing the line in del_bytes,
          the cached textlen value is invalidated

closes: #15178

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-07-08 21:12:55 +02:00
parent ab03dd2085
commit 03acd4761b
5 changed files with 24 additions and 4 deletions

View File

@@ -1355,17 +1355,17 @@ del_bytes(
mch_memmove(newp + col, oldp + col + count, (size_t)movelen);
if (alloc_newp)
ml_replace(lnum, newp, FALSE);
#ifdef FEAT_PROP_POPUP
else
{
#ifdef FEAT_PROP_POPUP
// Also move any following text properties.
if (oldlen + 1 < curbuf->b_ml.ml_line_len)
mch_memmove(newp + newlen + 1, oldp + oldlen + 1,
(size_t)curbuf->b_ml.ml_line_len - oldlen - 1);
#endif
curbuf->b_ml.ml_line_len -= count;
curbuf->b_ml.ml_line_textlen = 0;
}
#endif
// mark the buffer as changed and prepare for displaying
inserted_bytes(lnum, col, -count);