Skip to content

Commit 4358487

Browse files
committed
Only check the first column of a sign
Checking later columns isn't necessary. It wouldn't be possible for the row length to exceed a later sign column, but not the first.
1 parent 45f51ee commit 4358487

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lua/scrollview.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,12 +1879,9 @@ local show_signs = function(winid, sign_winids, bar_winid)
18791879
end
18801880
if to_bool(vim.g.scrollview_hide_on_text_intersect) then
18811881
local row_length_lookup = get_row_length_lookup(winid)
1882-
for c = col, col + sign_width - 1 do
1883-
if row_length_lookup[row] ~= nil
1884-
and row_length_lookup[row] >= c then
1885-
show = false
1886-
break
1887-
end
1882+
if row_length_lookup[row] ~= nil
1883+
and row_length_lookup[row] >= col then
1884+
show = false
18881885
end
18891886
end
18901887
if show then

0 commit comments

Comments
 (0)