mirror of
https://github.com/sxyazi/yazi.git
synced 2024-11-28 02:46:33 +03:00
fix: allow running ya.sync
in a sync plugin call (#702)
This commit is contained in:
parent
2e9b6b7b7b
commit
ed22be731a
@ -29,6 +29,10 @@ function ya.flat(t)
|
||||
end
|
||||
|
||||
function ya.sync(f)
|
||||
if ya.SYNC_ON then
|
||||
return function(...) f(...) end
|
||||
end
|
||||
|
||||
YAZI_SYNC_BLOCKS = YAZI_SYNC_BLOCKS + 1
|
||||
if YAZI_SYNC_CALLS == YAZI_SYNC_BLOCKS then
|
||||
YAZI_SYNC_ENTRY = f
|
||||
|
Loading…
Reference in New Issue
Block a user