@@ -5,7 +5,9 @@ local util = require("quicker.util")
55
66local M = {}
77
8- local EM_QUAD = " "
8+ -- A EM_QUAD and a space, we include an extra space before the real text, because it
9+ -- avoids strange cases such as no highlight when insert at start of qf text.
10+ local EM_QUAD = " "
911local EM_QUAD_LEN = EM_QUAD :len ()
1012M .EM_QUAD = EM_QUAD
1113M .EM_QUAD_LEN = EM_QUAD_LEN
@@ -343,7 +345,7 @@ add_qf_highlights = function(info)
343345 -- The parser will treat this as "-- a commentlocal a = 1".
344346 local region = {
345347 i - 1 ,
346- filename :len () + EM_QUAD_LEN ,
348+ filename :len () + EM_QUAD_LEN - 1 , -- skip EM_QUAD but include a space
347349 i ,
348350 0 ,
349351 }
@@ -485,7 +487,7 @@ function M.quickfixtextfunc(info)
485487 if user_data .header == " hard" then
486488 -- Header when expanded QF list
487489 local pieces = {
488- string.rep (b .strong_header , col_width + 1 ),
490+ string.rep (b .strong_header , col_width + 2 ),
489491 b .strong_cross ,
490492 string.rep (b .strong_header , lnum_width ),
491493 }
@@ -500,7 +502,7 @@ function M.quickfixtextfunc(info)
500502 elseif user_data .header == " soft" then
501503 -- Soft header when expanded QF list
502504 local pieces = {
503- string.rep (b .soft_header , col_width + 1 ),
505+ string.rep (b .soft_header , col_width + 2 ),
504506 b .soft_cross ,
505507 string.rep (b .soft_header , lnum_width ),
506508 }
0 commit comments