patch 9.2.0256: visual selection size not shown in showcmd during test

Commit: 
https://github.com/vim/vim/commit/06aa378056181aa68283ec5c16566b4097afff35
Author: zeertzjq <[email protected]>
Date:   Thu Mar 26 20:38:39 2026 +0000

    patch 9.2.0256: visual selection size not shown in showcmd during test
    
    Problem:  The visual selection size is not displayed in the showcmd area
              when entering visual mode from a script or mapping, because
              char_avail() incorrectly reports input as pending. This causes
              test failure on CI with the ASAN CI runner.
    Solution: Replace char_avail() with explicit checks for an empty stuff
              buffer, empty typeahead buffer, and not running a script
              (zeertzjq).
    
    related: #19801
    closes:  #19824
    
    Co-authored-by: zeertzjq <[email protected]>
    Signed-off-by: zeertzjq <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/normal.c b/src/normal.c
index a9b01821d..01ea4c091 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1616,7 +1616,8 @@ clear_showcmd(void)
     if (!p_sc)
        return;
 
-    if (VIsual_active && !char_avail())
+    if (VIsual_active
+       && stuff_empty() && typebuf.tb_len == 0 && !using_script())
     {
        int             cursor_bot = LT_POS(VIsual, curwin->w_cursor);
        long            lines;
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index 1ba407f05..ac27354d4 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1634,7 +1634,6 @@ func Test_visual_block_hl_with_autoselect()
   call writefile(lines, 'XTest_visual_block_autoselect', 'D')
 
   let buf = RunVimInTerminal('-S XTest_visual_block_autoselect', {'rows': 10})
-  call TermWait(buf)
   call VerifyScreenDump(buf, 'Test_visual_block_hl_with_autoselect_1', {})
   call term_sendkeys(buf, 'l')
   call VerifyScreenDump(buf, 'Test_visual_block_hl_with_autoselect_2', {})
diff --git a/src/version.c b/src/version.c
index a1e911946..5dbd0f401 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    256,
 /**/
     255,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1w5rZh-007QMQ-2A%40256bit.org.

Raspunde prin e-mail lui