style: expand one-liner if/then/end blocks for stylua

This commit is contained in:
Von Bravo 2026-02-16 21:46:45 -08:00
parent 3139275c09
commit 7d6eed7e41
2 changed files with 12 additions and 4 deletions

View file

@ -51,11 +51,15 @@ end
-- Mouse events
function Current:click(event, up)
if up or event.is_middle then return end
if up or event.is_middle then
return
end
local y = event.y - self._area.y + 1
local file = self._folder.window[y]
if not file then return end
if not file then
return
end
local abs = self._folder.offset + y
@ -93,7 +97,9 @@ function Current:click(event, up)
local files = self._folder.files
for i = lo, hi do
local f = files[i]
if f then urls[#urls + 1] = f.url end
if f then
urls[#urls + 1] = f.url
end
end
urls.state = "on"
ya.emit("toggle_all", urls)

View file

@ -51,7 +51,9 @@ end
-- Mouse events
function Root:click(event, up)
if tostring(cx.layer) ~= "mgr" then
if up then return end
if up then
return
end
ya.emit(tostring(cx.layer) .. ":close", {})
end
local c = ya.child_at(ui.Rect { x = event.x, y = event.y }, self:reflow())