mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.0186: virtual text without highlighting does not show
Problem: Virtual text without highlighting does not show. (Ben Jackson) Solution: Use a text property when it has highlighting or when it has text. (closes #10878)
This commit is contained in:
@@ -1706,7 +1706,8 @@ win_line(
|
||||
proptype_T *pt = text_prop_type_by_id(
|
||||
wp->w_buffer, text_props[tpi].tp_type);
|
||||
|
||||
if (pt != NULL && pt->pt_hl_id > 0
|
||||
if (pt != NULL && (pt->pt_hl_id > 0
|
||||
|| text_props[tpi].tp_id < 0)
|
||||
&& text_props[tpi].tp_id != -MAXCOL)
|
||||
{
|
||||
used_attr = syn_id2attr(pt->pt_hl_id);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
|p|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @40
|
||||
|F|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @34
|
||||
|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@49
|
||||
|l|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @42
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|1|,|7|6|-|9|2| @6|A|l@1|
|
||||
|
@@ -3,6 +3,6 @@
|
||||
| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
|
||||
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
|
||||
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
|
||||
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|1|,|7|6|-|9|2| @6|A|l@1|
|
||||
|
@@ -3,6 +3,6 @@
|
||||
| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s>t| @38
|
||||
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
|
||||
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
|
||||
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|2|,|7|-|1|9| @7|A|l@1|
|
||||
|
@@ -3,6 +3,6 @@
|
||||
| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
|
||||
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=>1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
|
||||
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
|
||||
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|3|,|1|3|-|1|6| @6|A|l@1|
|
||||
|
@@ -3,6 +3,6 @@
|
||||
| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
|
||||
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=>2+0#0000000&| |}|;| @32
|
||||
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
|
||||
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|3|,|1|6|-|2@1| @6|A|l@1|
|
||||
|
@@ -3,6 +3,6 @@
|
||||
| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
|
||||
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
|
||||
| +0#0000e05#a8a8a8255@1>e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
|
||||
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
|
||||
|~+0#4040ff13&| @58
|
||||
|~| @58
|
||||
| +0#0000000&@41|4|,|0|-|1| @8|A|l@1|
|
||||
|
@@ -2469,12 +2469,16 @@ func Test_prop_inserts_text()
|
||||
call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'})
|
||||
|
||||
call setline(3, 'Foo foo = { 1, 2 };')
|
||||
call prop_type_add( 'testprop', #{highlight: 'Comment'})
|
||||
call prop_type_add('testprop', #{highlight: 'Comment'})
|
||||
call prop_add(3, 13, #{type: 'testprop', text: '.x='})
|
||||
call prop_add(3, 16, #{type: 'testprop', text: '.y='})
|
||||
|
||||
call setline(4, '')
|
||||
call prop_add(4, 1, #{type: 'someprop', text: 'empty line'})
|
||||
|
||||
call setline(5, 'look highlight')
|
||||
call prop_type_add('nohi', #{})
|
||||
call prop_add(5, 6, #{type: 'nohi', text: 'no '})
|
||||
END
|
||||
call writefile(lines, 'XscriptPropsWithText')
|
||||
let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 8, cols: 60})
|
||||
|
@@ -735,6 +735,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
186,
|
||||
/**/
|
||||
185,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user