This is a pretty minor bug but I found it during revamping test cases (in Test_visual_hl_with_showbreak in test_visual.vim), as it has a chance to fail screen dumps. It's a little inconsistent because it's subject to timing.
Steps:
bug_repro.vim) with the following:
sleep 200m
call setline(1, 'aaaaabbbbccccdddd')
normal v4l
vim --clean -S bug_repro.vim.-- VISUAL -- at bottom.This doesn't happen all the time. I find that it's a lot easier to trigger using an ASAN build (build Vim using SANITIZER_CFLAGS="-g3 -O0 -DABORT_ON_INTERNAL_ERROR -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" env var) as this build is slower and more prone to this timing issue.
It should look like this (with the -- VISUAL --):
With this bug it will look like this:
image.png (view on web)Once you unselect and reselect the text, -- VISUAL -- will show up. Calling redraw in the sourced script will also properly draw it as well.
9.1.1101
OS: macOS 15.3
Terminal: Apple Terminal
Shell: ZSH
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I think this happens because escape sequences from the terminal cause the char_avail() in skip_showmode() to return TRUE:
int skip_showmode(void) { // Call char_avail() only when we are going to show something, because it // takes a bit of time. redrawing() may also call char_avail(). if (global_busy || msg_silent != 0 || !redrawing() || (char_avail() && !KeyTyped)) { redraw_mode = TRUE; // show mode later return TRUE; } return FALSE; }
Not sure how to solve this.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@ychin Could you check if the issue has been resolved through the PR?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()