vim --clean +'set cpo+=$' +'run plugin/matchparen.vim' +'bo vnew | winc p | vert res 40' <( cat <<EOF a long line with parentheses ( ) that wraps here line 1 line 1 line 2 line 2 line 3 line 3 line 4 line 4 line 5 line 5 line 6 line 6 line 7 line 7 line 8 line 8 line 9 line 9 line 10 line 10 line 11 line 11 line 12 line 12 line 13 line 13 line 14 line 14 EOF )
ct(qwe123asdqwe. Each keystroke deletes the next line.A :redraw! command or <C-L> is required to restore the screen contents.
https://github.com/user-attachments/assets/bb8bcc67-4963-4eca-ae20-7a2c028ac763
If we use cf( instead of ct( then it works as expected.
vim v9.1.1879
Os: Arch Linux
Terminal: kitty
$TERM: xterm-kitty
shell: bash 5.3.3
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Simple solution:
diff --git a/src/drawscreen.c b/src/drawscreen.c index 0519940b1..5a339f2ba 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2289,7 +2289,7 @@ win_update(win_T *wp) // Don't scroll when redrawing the top, scrolled already above. if (lnum == mod_top && mod_bot != MAXLNUM - && !(dollar_vcol >= 0 && mod_bot == mod_top + 1) + && !(dollar_vcol >= 0) && row >= top_end) { int old_rows = 0; @@ -2457,6 +2457,11 @@ win_update(win_T *wp) } } } + else if (dollar_vcol >= 0 && mod_bot > mod_top + 1) + // When dollar_vcol >= 0 the cursor line isn't fully redrawn, + // but if other lines need to be redrawn it becomes tricky. + // Redraw until the end in this case. + mod_bot = MAXLNUM; #ifdef FEAT_FOLDING // When lines are folded, display one line for all of them.
No sure if these is a better solution.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Your patch fixes the problem, thank you @zeertzjq !
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thanks both. can your make a PR out of this @zeertzjq (with a test please)?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I may try to find another solution, which may take some time.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #18647 as completed via 5c3e762.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.