@@ -76,19 +76,40 @@ vimdoc.argument = function (buffer, item)
7676 hl_mode = " combine"
7777 });
7878
79- vim .api .nvim_buf_set_extmark (buffer , vimdoc .ns , range .row_end , range .col_end - 1 , {
80- undo_restore = false , invalidate = true ,
81- end_col = range .col_end ,
82- conceal = " " ,
79+ if string.match (item .text [1 ], " ?$" ) then
80+ vim .api .nvim_buf_set_extmark (buffer , vimdoc .ns , range .row_end , range .col_end - 2 , {
81+ undo_restore = false , invalidate = true ,
8382
84- virt_text_pos = " inline" ,
85- virt_text = {
86- { config .padding_right or " " , utils .set_hl (config .padding_right_hl or config .hl ) },
87- { config .corner_right or " " , utils .set_hl (config .corner_right_hl or config .hl ) }
88- },
83+ end_col = range .col_end - 1 ,
84+ conceal = " " ,
85+ });
8986
90- hl_mode = " combine"
91- });
87+ vim .api .nvim_buf_set_extmark (buffer , vimdoc .ns , range .row_end , range .col_end , {
88+ undo_restore = false , invalidate = true ,
89+
90+ virt_text_pos = " inline" ,
91+ virt_text = {
92+ { config .padding_right or " " , utils .set_hl (config .padding_right_hl or config .hl ) },
93+ { config .corner_right or " " , utils .set_hl (config .corner_right_hl or config .hl ) }
94+ },
95+
96+ hl_mode = " combine"
97+ });
98+ else
99+ vim .api .nvim_buf_set_extmark (buffer , vimdoc .ns , range .row_end , range .col_end - 1 , {
100+ undo_restore = false , invalidate = true ,
101+ end_col = range .col_end ,
102+ conceal = " " ,
103+
104+ virt_text_pos = " inline" ,
105+ virt_text = {
106+ { config .padding_right or " " , utils .set_hl (config .padding_right_hl or config .hl ) },
107+ { config .corner_right or " " , utils .set_hl (config .corner_right_hl or config .hl ) }
108+ },
109+
110+ hl_mode = " combine"
111+ });
112+ end
92113
93114 --- @type string Added virtual text.
94115 local ext = table.concat ({
0 commit comments