Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lua/fff/location_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ function M.highlight_grep_matches(bufnr, location, namespace)

-- Build case-insensitive pattern if the query has no uppercase (smart case)
local has_upper = search_text:match('[A-Z]')
local escaped = vim.pesc(search_text)

-- Highlight pattern occurrences in a window around the target line.
-- Limit to ±200 lines from target to keep it fast for large files.
Expand All @@ -218,7 +217,7 @@ function M.highlight_grep_matches(bufnr, location, namespace)
for idx, line in ipairs(lines) do
local i = scan_start + idx - 1
local search_line = has_upper and line or line:lower()
local search_pat = has_upper and escaped or escaped:lower()
local search_pat = has_upper and search_text or search_text:lower()
local start_pos = 1
while true do
local s, e = search_line:find(search_pat, start_pos, true)
Expand Down
Loading