From bdcf708d778ead11d355f6e36618b1b7e6d4776f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 08:24:22 +0530 Subject: [PATCH] fix vi nomode issue --- lua/statusline.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index afd433d..3b3ebb6 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -137,7 +137,11 @@ gls.right[4] = { v = "Visual", R = "Replace" } - return " " .. alias[vim.fn.mode()] .. " " + local current_Mode = alias[vim.fn.mode()] + + if current_Mode ~= nil then + return " " .. current_Mode .. " " + end end, highlight = {colors.red, colors.lightbg} }