Skip to content

Commit

Permalink
refactor!: remove vim.g.yazi_opened (integer)
Browse files Browse the repository at this point in the history
It was not used and is not needed
  • Loading branch information
barona-mika-vilpas committed Feb 25, 2024
1 parent 9d55f31 commit 9e5b584
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lua/yazi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ local M = {}
---@type integer?
YAZI_BUFFER = nil
YAZI_LOADED = false
vim.g.yazi_opened = 0
local prev_win = -1

---@type integer?
Expand All @@ -23,7 +22,6 @@ local function on_exit(job_id, code, event)

YAZI_BUFFER = nil
YAZI_LOADED = false
vim.g.yazi_opened = 0
vim.cmd('silent! :checktime')

-- NOTE the types for nvim_ apis are inaccurate so we need to typecast
Expand Down Expand Up @@ -54,7 +52,6 @@ end
local function exec_yazi_command(cmd)
if YAZI_LOADED == false then
-- ensure that the buffer is closed on exit
vim.g.yazi_opened = 1
vim.fn.termopen(cmd, { on_exit = on_exit })
end
vim.cmd('startinsert')
Expand Down

0 comments on commit 9e5b584

Please sign in to comment.