From 7b17b794f60ba14dcf25abf80899635135d4eadd Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 1 Apr 2024 18:59:52 +0100 Subject: [PATCH] Make column/line chunk match --- lua/statusline.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index 7cf7fc5..25b3cfa 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -60,6 +60,9 @@ local function get_mode() return current_mode.name end +-- Display cusor line/total and column +local position = '# ☰ %l/%L 󰠷 %2c ' + -- Construct a statusline for special buffer types. local function special(group, name, title) -- Display current mode with dynamic highlights. @@ -67,7 +70,7 @@ local function special(group, name, title) -- Display filename with dark highlights. line = line .. '%#StatusLineDark# ' .. title -- Display current/total lines and column with dynamic highlights. - line = line .. '%=' .. '%#' .. group .. '# ☰%l/%L ·%2c ' + line = line .. '%=' .. '%#' .. group .. position -- Combine the elements into a single string to be evaluated. return line end @@ -100,7 +103,7 @@ local function generic(group, name, show_lsp) '%{&fileencoding ==# "utf-8" ? "" : &fileencoding}' .. '%{&fileformat ==# "unix" ? "" : "[".&fileformat."]"}' .. ' %)' -- Display current/total lines and column with dynamic highlights. - line = line .. '%#' .. group .. '# ☰ %l/%L 󰠷 %2c ' + line = line .. '%#' .. group .. position -- Combine the elements into a single string to be evaluated. return line end