Skip to content

Commit 41e6728

Browse files
committed
feat(lualine): use global window size for trunc
Since I switched to a global status bar, it makes sense to truncate on global window size
1 parent 8488ed4 commit 41e6728

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nvim/lua/plugins/lualine.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ return {
1818
--- return function that can format the component accordingly
1919
local function trunc(trunc_width, trunc_len, hide_width, no_ellipsis)
2020
return function(str)
21-
local win_width = vim.fn.winwidth(0)
21+
local win_width = vim.o.columns
2222
if hide_width and win_width < hide_width then
2323
return ''
2424
elseif trunc_width and trunc_len and win_width < trunc_width and #str > trunc_len then

0 commit comments

Comments
 (0)