From 181b14348f513e6f9eb3bdd2252e13630094fdd3 Mon Sep 17 00:00:00 2001 From: Fitrah Muhammad <55179750+fitrh@users.noreply.github.com> Date: Fri, 18 Mar 2022 22:08:52 +0800 Subject: [PATCH] fix(filename): use columns for shortening if using global statusline (#617) --- lua/lualine/components/filename.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lualine/components/filename.lua b/lua/lualine/components/filename.lua index a2922e4..dfaf3f3 100644 --- a/lua/lualine/components/filename.lua +++ b/lua/lualine/components/filename.lua @@ -55,7 +55,7 @@ M.update_status = function(self) end if self.options.shorting_target ~= 0 then - local windwidth = vim.fn.winwidth(0) + local windwidth = self.options.globalstatus and vim.go.columns or vim.fn.winwidth(0) local estimated_space_available = windwidth - self.options.shorting_target local path_separator = package.config:sub(1, 1)