feat: compatibility with Yazi v0.4 for the no-status plugin
This commit is contained in:
@@ -29,6 +29,8 @@ return {
|
|||||||
local output, err = Command("diff"):arg("-Naur"):arg(tostring(a)):arg(tostring(b)):output()
|
local output, err = Command("diff"):arg("-Naur"):arg(tostring(a)):arg(tostring(b)):output()
|
||||||
if not output then
|
if not output then
|
||||||
return info("Failed to run diff, error: " .. err)
|
return info("Failed to run diff, error: " .. err)
|
||||||
|
elseif output.stdout == "" then
|
||||||
|
return info("No differences found")
|
||||||
end
|
end
|
||||||
|
|
||||||
ya.clipboard(output.stdout)
|
ya.clipboard(output.stdout)
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
local function setup()
|
local function setup()
|
||||||
local old_layout = Tab.layout
|
local old_layout = Tab.layout
|
||||||
|
|
||||||
Status.render = function() return {} end
|
-- TODO: remove this check once v0.4 is released
|
||||||
|
if Status.redraw then
|
||||||
|
Status.redraw = function() return {} end
|
||||||
|
else
|
||||||
|
Status.render = function() return {} end
|
||||||
|
end
|
||||||
|
|
||||||
Tab.layout = function(self, ...)
|
Tab.layout = function(self, ...)
|
||||||
self._area = ui.Rect { x = self._area.x, y = self._area.y, w = self._area.w, h = self._area.h + 1 }
|
self._area = ui.Rect { x = self._area.x, y = self._area.y, w = self._area.w, h = self._area.h + 1 }
|
||||||
return old_layout(self, ...)
|
return old_layout(self, ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user