From 9e5b584082c012b6c834a605111b8a19e9219dc3 Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Sun, 25 Feb 2024 16:41:05 +0200 Subject: [PATCH] refactor!: remove vim.g.yazi_opened (integer) It was not used and is not needed --- lua/yazi.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/yazi.lua b/lua/yazi.lua index e9c8883f..f6f06286 100644 --- a/lua/yazi.lua +++ b/lua/yazi.lua @@ -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? @@ -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 @@ -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')