Skip to content

Commit 86fb446

Browse files
committed
fix: "search" icon row count increases when "search" coordinate is multiple of 4
1 parent 6766bb5 commit 86fb446

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/neominimap/map/handlers/builtins/search.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ local get_matches = function(bufnr)
7575
for lnum, line in ipairs(lines) do
7676
local ok, col = pcall(fn.match, line, pattern, 0)
7777
if ok and col ~= -1 then
78+
lnum = lnum + (lnum % 4 == 0 and 0 or 1)
7879
matches[#matches + 1] = lnum
7980
end
8081
end
@@ -97,8 +98,8 @@ M.get_annotations = function(bufnr)
9798
return vim.tbl_map(function(lnum)
9899
---@type Neominimap.Map.Handler.Annotation[]
99100
return {
100-
lnum = lnum + 1,
101-
end_lnum = lnum + 1,
101+
lnum = lnum,
102+
end_lnum = lnum,
102103
priority = config.search.priority,
103104
id = 1,
104105
icon = config.search.icon,

0 commit comments

Comments
 (0)