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

Commit: 
https://github.com/vim/vim/commit/03acd4761be1c2766d3ec17534ea63cdf8dd565d
Author: Christian Brabandt <c...@256bit.org>
Date:   Mon Jul 8 21:12:55 2024 +0200

    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 <zeert...@outlook.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/change.c b/src/change.c
index dacc06fd4..72d01c51a 100644
--- a/src/change.c
+++ b/src/change.c
@@ -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);
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index a49f15875..f199fec6a 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -20,7 +20,8 @@ SCRIPTS_TINY = \
        test24 \
        test25 \
        test26 \
-       test27
+       test27 \
+       test28
 
 SCRIPTS_TINY_OUT = \
        test10.out \
@@ -31,7 +32,8 @@ SCRIPTS_TINY_OUT = \
        test24.out \
        test25.out \
        test26.out \
-       test27.out
+       test27.out \
+       test28.out
 
 # Tests for Vim9 script.
 TEST_VIM9 = \
diff --git a/src/testdir/test28.in b/src/testdir/test28.in
new file mode 100644
index 000000000..3d5289d22
--- /dev/null
+++ b/src/testdir/test28.in
@@ -0,0 +1,13 @@
+Test for using CTRL-A/CTRL-X in tiny mode
+
+STARTTEST
+/12352
+ /12354
+ :/^STARTHERE/+,$w! test.out
+:qa!
+ENDTEST
+
+STARTHERE
+12352
+
+12354
diff --git a/src/testdir/test28.ok b/src/testdir/test28.ok
new file mode 100644
index 000000000..085c1331a
--- /dev/null
+++ b/src/testdir/test28.ok
@@ -0,0 +1,3 @@
+12353
+
+12353
diff --git a/src/version.c b/src/version.c
index 59c9f976c..53bafd37d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    546,
 /**/
     545,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sQtpK-00BLbQ-K7%40256bit.org.

Raspunde prin e-mail lui