Skip to content

Commit 17efc7f

Browse files
committed
patch 8.1.2158: terminal attributes missing in Terminal-normal mode
Problem: Terminal attributes missing in Terminal-normal mode. Solution: Use "syntax_attr".
1 parent 8f7b29f commit 17efc7f

4 files changed

Lines changed: 32 additions & 1 deletion

File tree

src/drawline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ win_line(
15171517
else
15181518
#endif
15191519
#ifdef FEAT_SYN_HL
1520-
if (has_syntax)
1520+
if (has_syntax || get_term_attr)
15211521
char_attr = syntax_attr;
15221522
else
15231523
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
>1+0&#ffffff0| @73
2+
|2| |╔+0&#5fd7ff255|═@11|╗| +0&#ffffff0@5|╔+0&#dadada255|═@11|╗+0&#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
3+
|3| |║+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#5fd7ff255| +0&#ffffff0@5|║+0&#a8a8a8255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@1
4+
|4| |╚+0&#5fd7ff255|═@11|╝| +0&#ffffff0@5|║+0&#a8a8a8255|a+0#0000001#ffd7ff255|n|d| |m|o|r|e| @3|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|l+0#0000001#ffd7ff255|i|n|e|s| |o|n|l|y| @1|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |c|o|r|n|e|r|s|x+0#0000000#5fd7ff255| +0&#ffffff0@1
5+
|5| @20|╚+0&#585858255|═@11|╝| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
6+
|6| |4+0&#5fd7ff255|0@11|5| +0&#ffffff0@58
7+
|7| |3+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|1+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255@13| +0&#ffffff0@38
8+
|8| |3+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |n|u|m|b|e|r|s|1+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r| +0#0000000#5fd7ff255| +0&#ffffff0@38
9+
|9| |7+0&#5fd7ff255|2@11|6| +0&#ffffff0@5| +0&#5fd7ff255|j+0#0000001#ffd7ff255|u|s|t| |b|l|a|n|k|s| | +0#0000000#5fd7ff255| +0&#ffffff0@38
10+
|1|0| @19| +0&#5fd7ff255@13| +0&#ffffff0@38
11+
|1@1| @72
12+
|d+2#ffffff16#00e0003|u|m|p| |d|i|f@1| |d|u|m|p|s|/|T|e|s|t|_|p|o|p|u|p|w|i|n|_|2@1|.|d|u|m|p| |[|f|i|n|i|s|h|e|d|]| @8|1|,|1| @11|T|o|p
13+
| +0#0000000#ffffff0@74
14+
|[+1&&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
15+
| +0&&@74

src/testdir/test_terminal.vim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,20 @@ func Test_terminal_dumpload()
11401140
quit
11411141
endfunc
11421142

1143+
func Test_terminal_dumpload_dump()
1144+
CheckRunVimInTerminal
1145+
1146+
let lines =<< trim END
1147+
call term_dumpload('dumps/Test_popupwin_22.dump', #{term_rows: 12})
1148+
END
1149+
call writefile(lines, 'XtermDumpload')
1150+
let buf = RunVimInTerminal('-S XtermDumpload', #{rows: 15})
1151+
call VerifyScreenDump(buf, 'Test_terminal_dumpload', {})
1152+
1153+
call StopVimInTerminal(buf)
1154+
call delete('XtermDumpload')
1155+
endfunc
1156+
11431157
func Test_terminal_dumpdiff()
11441158
call assert_equal(1, winnr('$'))
11451159
eval 'dumps/Test_popup_command_01.dump'->term_dumpdiff('dumps/Test_popup_command_02.dump')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ static char *(features[]) =
753753

754754
static int included_patches[] =
755755
{ /* Add new patch number below this line */
756+
/**/
757+
2158,
756758
/**/
757759
2157,
758760
/**/

0 commit comments

Comments
 (0)