]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0071: command overlaps with printed text in scrollback v9.0.0071
authorzeertzjq <zeertzjq@outlook.com>
Mon, 25 Jul 2022 18:50:57 +0000 (19:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 25 Jul 2022 18:50:57 +0000 (19:50 +0100)
Problem:    Command overlaps with printed text in scrollback.
Solution:   Clear until end-of-line and use correct message chunk.
            (closes #10765, closes #10764)

src/message.c
src/testdir/test_messages.vim
src/version.c

index 1f26a23413ad3061c4bfcfd8aa998016f305d630..7ba82fa050ba5dc4217a4ac318b241c1e4d88aea 100644 (file)
@@ -2595,6 +2595,7 @@ sb_text_start_cmdline(void)
 sb_text_end_cmdline(void)
 {
     do_clear_sb_text = SB_CLEAR_CMDLINE_DONE;
+    msg_sb_eol();
 }
 
 /*
@@ -2614,7 +2615,7 @@ clear_sb_text(int all)
     {
        if (last_msgchunk == NULL)
            return;
-       lastp = &last_msgchunk->sb_prev;
+       lastp = &msg_sb_start(last_msgchunk)->sb_prev;
     }
 
     while (*lastp != NULL)
index 32689b09eaf2d09aba8590e31d587450cf9602a8..1967a3efa783be2daec2d806358c3773a9ecc161 100644 (file)
@@ -233,7 +233,8 @@ func Test_message_more()
 
   " Up all the way with 'g'.
   call term_sendkeys(buf, 'g')
-  call WaitForAssert({-> assert_equal('  5 5', term_getline(buf, 5))})
+  call WaitForAssert({-> assert_equal('  4 4', term_getline(buf, 5))})
+  call WaitForAssert({-> assert_equal(':%p#', term_getline(buf, 1))})
   call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))})
 
   " All the way down. Pressing f should do nothing but pressing
index 83d135db2cb0df46e760ccbd808d66d7d1baac78..2f2d54022015abe70081c5662723bc5b57f22c5f 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    71,
 /**/
     70,
 /**/