fix: adapt to the nightly change of linemode

This commit is contained in:
sxyazi
2025-12-24 01:04:00 +08:00
parent 7b0adcd854
commit 05234ed158
2 changed files with 8 additions and 1 deletions

View File

@@ -189,6 +189,11 @@ local function setup(st, opts)
}
Linemode:children_add(function(self)
-- TODO: use `not self._file.in_current` instead
if self._file.in_current == false then
return ""
end
local url = self._file.url
local repo = st.dirs[tostring(url.base or url.parent)]
local code

View File

@@ -32,7 +32,9 @@ local function setup(st, opts)
local url = tostring(self._file.url)
local spans = {}
for _, tag in ipairs(st.tags[url] or {}) do
if self._file.is_hovered then
-- TODO: use `not self._file.in_current` instead
if self._file.in_current == false then
elseif self._file.is_hovered then
spans[#spans + 1] = ui.Span(""):bg(st.colors[tag] or "reset")
else
spans[#spans + 1] = ui.Span(""):fg(st.colors[tag] or "reset")