From d1477655707c6d485ba65bdefcdd814582971703 Mon Sep 17 00:00:00 2001 From: Mateen Ulhaq Date: Sat, 7 Oct 2023 15:55:13 -0700 Subject: [PATCH] fix(init): TelescopePreviewerLoaded allow empty bufname --- lua/ltex-utils/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/ltex-utils/init.lua b/lua/ltex-utils/init.lua index fdf0381..c39d788 100644 --- a/lua/ltex-utils/init.lua +++ b/lua/ltex-utils/init.lua @@ -63,6 +63,9 @@ local function autocmd_ltex() pattern = "TelescopePreviewerLoaded", callback = function(args) ---@type string + if args.data.bufname == nil then + return + end local extension = args.data.bufname:match("%.(%w+)$") if extension == "md" or extension == "tex" then vim.wo.number = Config.rule_ui.previewer_line_number