mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 9.0.0758: "precedes" from 'listchars' overwritten by <<<
Problem: "precedes" from 'listchars' overwritten by <<< for 'smoothscroll'. Solution: Keep the "precedes" character.
This commit is contained in:
parent
eb4de62931
commit
13cdde3952
@ -766,9 +766,11 @@ wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
|
|||||||
{
|
{
|
||||||
if (wlv->row == 0 && wp->w_skipcol > 0
|
if (wlv->row == 0 && wp->w_skipcol > 0
|
||||||
#if defined(FEAT_LINEBREAK)
|
#if defined(FEAT_LINEBREAK)
|
||||||
|
// do not overwrite the 'showbreak' text with "<<<"
|
||||||
&& *get_showbreak_value(wp) == NUL
|
&& *get_showbreak_value(wp) == NUL
|
||||||
#endif
|
#endif
|
||||||
)
|
// do not overwrite the 'listchars' "precedes" text with "<<<"
|
||||||
|
&& !(wp->w_p_list && wp->w_lcs_chars.prec != 0))
|
||||||
{
|
{
|
||||||
int off = (int)(current_ScreenLine - ScreenLines);
|
int off = (int)(current_ScreenLine - ScreenLines);
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
|
8
src/testdir/dumps/Test_smooth_list_1.dump
Normal file
8
src/testdir/dumps/Test_smooth_list_1.dump
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|<+0#4040ff13#ffffff0@2|t+0#0000000&| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y|
|
||||||
|
>l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t|
|
||||||
|
|v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g|
|
||||||
|
|t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |$+0#4040ff13&| +0#0000000&@18
|
||||||
|
|t|h|r|e@1|$+0#4040ff13&| +0#0000000&@33
|
||||||
|
|~+0#4040ff13&| @38
|
||||||
|
|~| @38
|
||||||
|
| +0#0000000&@21|2|,|8|1| @9|B|o|t|
|
8
src/testdir/dumps/Test_smooth_list_2.dump
Normal file
8
src/testdir/dumps/Test_smooth_list_2.dump
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|#+0#4040ff13#ffffff0|e+0#0000000&|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y|
|
||||||
|
>l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t|
|
||||||
|
|v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |v|e|r|y| |l|o|n|g|
|
||||||
|
|t|e|x|t| |v|e|r|y| |l|o|n|g| |t|e|x|t| |$+0#4040ff13&| +0#0000000&@18
|
||||||
|
|t|h|r|e@1|$+0#4040ff13&| +0#0000000&@33
|
||||||
|
|~+0#4040ff13&| @38
|
||||||
|
|~| @38
|
||||||
|
|:+0#0000000&|s|e|t| |l|i|s|t|c|h|a|r|s|+|=|p|r|e|c|e|d|2|,|8|1| @9|B|o|t|
|
@ -155,6 +155,31 @@ func Test_smoothscroll_number()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_smoothscroll_list()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
vim9script
|
||||||
|
set smoothscroll scrolloff=0
|
||||||
|
set list
|
||||||
|
setline(1, [
|
||||||
|
'one',
|
||||||
|
'very long text '->repeat(12),
|
||||||
|
'three',
|
||||||
|
])
|
||||||
|
exe "normal 2Gzt\<C-E>"
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XSmoothList', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S XSmoothList', #{rows: 8, cols: 40})
|
||||||
|
|
||||||
|
call VerifyScreenDump(buf, 'Test_smooth_list_1', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":set listchars+=precedes:#\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_smooth_list_2', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_smoothscroll_diff_mode()
|
func Test_smoothscroll_diff_mode()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
758,
|
||||||
/**/
|
/**/
|
||||||
757,
|
757,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user