From e99d733e0213ceb8f548ae6551b04ae32e590c80 Mon Sep 17 00:00:00 2001 From: shadmansaleh <shadmansaleh@users.noreply.github.com> Date: Tue, 14 Feb 2023 17:04:13 +0000 Subject: [PATCH] chore: autogen (vimdocs+formating) --- lua/lualine.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/lualine.lua b/lua/lualine.lua index 05ff719..435547f 100644 --- a/lua/lualine.lua +++ b/lua/lualine.lua @@ -337,15 +337,17 @@ local function refresh(opts) -- https://github.com/nvim-lualine/lualine.nvim/issues/755 -- https://github.com/neovim/neovim/issues/19472 -- https://github.com/nvim-lualine/lualine.nvim/issues/791 - if opts.trigger == 'autocmd' and - vim.v.event.new_mode ~= 'c' and + if + opts.trigger == 'autocmd' + and vim.v.event.new_mode ~= 'c' -- scheduling in op-pending mode seems to call the callback forever. -- so this is restricted in op-pending mode. -- https://github.com/neovim/neovim/issues/22263 -- https://github.com/nvim-lualine/lualine.nvim/issues/967 -- note this breaks mode component while switching to op-pending mode - not vim.tbl_contains({'no', 'nov', 'noV'}, vim.v.event.new_mode) and - not vim.tbl_contains({'no', 'nov', 'noV'}, vim.v.event.old_mode) then + and not vim.tbl_contains({ 'no', 'nov', 'noV' }, vim.v.event.new_mode) + and not vim.tbl_contains({ 'no', 'nov', 'noV' }, vim.v.event.old_mode) + then opts.trigger = 'autocmd_redired' vim.schedule(function() M.refresh(opts)