diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 1ad2b6f0..f14096db 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -140,10 +140,14 @@ function M.statuscolumn() local is_num = vim.wo[win].number local is_relnum = vim.wo[win].relativenumber if (is_num or is_relnum) and vim.v.virtnum == 0 then - if vim.v.relnum == 0 then - components[2] = is_num and "%l" or "%r" -- the current line + if vim.fn.has("nvim-0.11") == 1 then + components[2] = "%l" -- 0.11 handles both the current and other lines with %l else - components[2] = is_relnum and "%r" or "%l" -- other lines + if vim.v.relnum == 0 then + components[2] = is_num and "%l" or "%r" -- the current line + else + components[2] = is_relnum and "%r" or "%l" -- other lines + end end components[2] = "%=" .. components[2] .. " " -- right align end