From 4ead575b155aaf666a7867adb94f552a3cdda06a Mon Sep 17 00:00:00 2001 From: glepnir Date: Mon, 29 Apr 2024 18:52:08 +0800 Subject: [PATCH] wininfo check --- lua/epo/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/epo/init.lua b/lua/epo/init.lua index d0a7a58..7c70836 100644 --- a/lua/epo/init.lua +++ b/lua/epo/init.lua @@ -92,6 +92,9 @@ local function close_popup_win(winid) end local function popup_markdown_set(wininfo) + if vim.tbl_isempty(wininfo) then + return + end vim.wo[wininfo.winid].conceallevel = 2 vim.wo[wininfo.winid].concealcursor = 'niv' vim.treesitter.start(wininfo.bufnr, 'markdown') @@ -127,9 +130,6 @@ local function show_info(bufnr, curitem, selected) return end local wininfo = api.nvim_complete_set(selected, { info = value }) - if vim.tbl_isempty(wininfo) then - return - end popup_markdown_set(wininfo) end, bufnr) end