Mercurial > vim
view src/libvterm/t/40state_selection.test @ 34441:84a5cafeb34c v9.1.0140
patch 9.1.0140: cursor on wrong row after 1 char 'below' virtual text when EOL is shown
Commit: https://github.com/vim/vim/commit/da0c9137d1ec96f4d79b818502d2f921a21f710e
Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Date: Tue Feb 27 20:25:10 2024 +0100
patch 9.1.0140: cursor on wrong row after 1 char 'below' virtual text when EOL is shown
Problem: The cursor screen row was incorrectly being calculated when the
cursor follows a 1 character text_align 'below' virtual text line,
resulting in the cursor being shown on the wrong line.
This was caused by a cell size of 2 instead of 1 being used for the EOL
character, which propagated to the calculation of space for putting the
'below' virtual text on its own line. (rickhowe)
Solution: Fix the size used for the EOL character in calculating the
cursor's screen position (Dylan Thacker-Smith)
fixes: #11959
related: #12028
closes: #14096
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 27 Feb 2024 20:30:03 +0100 |
parents | b13f723a7ec6 |
children |
line wrap: on
line source
INIT UTF8 1 WANTSTATE !Set clipboard; final chunk len 4 PUSH "\e]52;c;SGVsbG8s\e\\" selection-set mask=0001 ["Hello,"] !Set clipboard; final chunk len 3 PUSH "\e]52;c;SGVsbG8sIHc=\e\\" selection-set mask=0001 ["Hello, w"] !Set clipboard; final chunk len 2 PUSH "\e]52;c;SGVsbG8sIHdvcmxkCg==\e\\" selection-set mask=0001 ["Hello, world\n"] !Set clipboard; split between chunks PUSH "\e]52;c;SGVs" selection-set mask=0001 ["Hel" PUSH "bG8s\e\\" selection-set mask=0001 "lo,"] !Set clipboard; split within chunk PUSH "\e]52;c;SGVsbG" selection-set mask=0001 ["Hel" PUSH "8s\e\\" selection-set mask=0001 "lo,"] !Set clipboard; empty first chunk PUSH "\e]52;c;" PUSH "SGVsbG8s\e\\" selection-set mask=0001 ["Hello,"] !Set clipboard; empty final chunk PUSH "\e]52;c;SGVsbG8s" selection-set mask=0001 ["Hello," PUSH "\e\\" selection-set mask=0001 ] !Set clipboard; longer than buffer PUSH "\e]52;c;" . "LS0t"x10 . "\e\\" selection-set mask=0001 ["-"x15 selection-set mask=0001 "-"x15] !Clear clipboard PUSH "\e]52;c;\e\\" selection-set mask=0001 [] !Set invalid data clears and ignores PUSH "\e]52;c;SGVs*SGVsbG8s\e\\" selection-set mask=0001 [] !Query clipboard PUSH "\e]52;c;?\e\\" selection-query mask=0001 !Send clipboard; final chunk len 4 SELECTION 1 ["Hello,"] output "\e]52;c;SGVsbG8s\e\\" !Send clipboard; final chunk len 3 SELECTION 1 ["Hello, w"] output "\e]52;c;SGVsbG8sIHc=\e\\" !Send clipboard; final chunk len 2 SELECTION 1 ["Hello, world\n"] output "\e]52;c;SGVsbG8sIHdvcmxkCg==\e\\" !Send clipboard; split between chunks SELECTION 1 ["Hel" output "\e]52;c;SGVs" SELECTION 1 "lo,"] output "bG8s\e\\" !Send clipboard; split within chunk SELECTION 1 ["Hello" output "\e]52;c;SGVs" SELECTION 1 ","] output "bG8s\e\\"