Skip to content

Commit 532b66e

Browse files
committed
Revert "fix: EM_QUAD doesn't need a space"
This reverts commit 5e9ed34.
1 parent 81ecc67 commit 532b66e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lua/quicker/display.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ local util = require("quicker.util")
55

66
local 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 = ""
911
local EM_QUAD_LEN = EM_QUAD:len()
1012
M.EM_QUAD = EM_QUAD
1113
M.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

Comments
 (0)