mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
patch 9.0.0905: virtual text after the line wraps when 'wrap' is off
Problem: Virtual text after the line wraps when 'wrap' is off. Solution: Only set text_prop_follows when wrapping. (closes #11463)
This commit is contained in:
parent
88456cd3c4
commit
02edfaa610
@ -2043,7 +2043,9 @@ win_line(
|
|||||||
p_extra_free2 = wlv.p_extra;
|
p_extra_free2 = wlv.p_extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcs_eol_one < 0 && wlv.col
|
if (lcs_eol_one < 0
|
||||||
|
&& wp->w_p_wrap
|
||||||
|
&& wlv.col
|
||||||
+ wlv.n_extra - 2 > wp->w_width)
|
+ wlv.n_extra - 2 > wp->w_width)
|
||||||
// don't bail out at end of line
|
// don't bail out at end of line
|
||||||
text_prop_follows = TRUE;
|
text_prop_follows = TRUE;
|
||||||
|
6
src/testdir/dumps/Test_text_after_nowrap_list_1.dump
Normal file
6
src/testdir/dumps/Test_text_after_nowrap_list_1.dump
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|s+0&#ffffff0|o|m|e| |t|e|x|t| |h|e|r|e|$+0#4040ff13&| +0#0000000&@1|T+0&#ffd7ff255|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s|.| +0&#ffffff0@1|■+0&#ffd7ff255| |T|h|e| |f|o|x| |j|u|m|p|>+0#4040ff13#ffffff0
|
||||||
|
|$| +0#0000000&@58
|
||||||
|
|l|a|s|t| |l|i|n>e|$+0#4040ff13&| +0#0000000&@49
|
||||||
|
|~+0#4040ff13&| @58
|
||||||
|
|~| @58
|
||||||
|
| +0#0000000&@41|3|,|9| @10|A|l@1|
|
@ -3393,6 +3393,42 @@ func Test_text_after_nowrap()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_text_after_nowrap_list()
|
||||||
|
CheckRunVimInTerminal
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
vim9script
|
||||||
|
|
||||||
|
set nowrap
|
||||||
|
set listchars+=extends:>
|
||||||
|
set list
|
||||||
|
setline(1, ['some text here', '', 'last line'])
|
||||||
|
|
||||||
|
prop_type_add('test', {highlight: 'DiffChange'})
|
||||||
|
prop_add(1, 0, {
|
||||||
|
type: 'test',
|
||||||
|
text: 'The quick brown fox jumps.',
|
||||||
|
text_padding_left: 2,
|
||||||
|
})
|
||||||
|
prop_add(1, 0, {
|
||||||
|
type: 'test',
|
||||||
|
text: '■ The fox jumps over the lazy dog.',
|
||||||
|
text_padding_left: 2,
|
||||||
|
})
|
||||||
|
prop_add(1, 0, {
|
||||||
|
type: 'test',
|
||||||
|
text: '■ The lazy dog.',
|
||||||
|
text_padding_left: 2,
|
||||||
|
})
|
||||||
|
normal 3G$
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XTextAfterNowrapList', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S XTextAfterNowrapList', #{rows: 6, cols: 60})
|
||||||
|
call VerifyScreenDump(buf, 'Test_text_after_nowrap_list_1', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_text_below_nowrap()
|
func Test_text_below_nowrap()
|
||||||
CheckRunVimInTerminal
|
CheckRunVimInTerminal
|
||||||
|
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
905,
|
||||||
/**/
|
/**/
|
||||||
904,
|
904,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user