From 60e8cadb46d326c1e1da9615850cc479bbf32fc4 Mon Sep 17 00:00:00 2001 From: hedy Date: Mon, 13 Nov 2023 15:20:54 +0800 Subject: [PATCH] fix: lineno left prefix padding --- lua/outline/writer.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/outline/writer.lua b/lua/outline/writer.lua index 631d0c4..0ddd5b6 100644 --- a/lua/outline/writer.lua +++ b/lua/outline/writer.lua @@ -121,8 +121,7 @@ function M.make_outline(bufnr, items) -- Find the prefix for each line needed for the lineno space local lineno_offset = 0 local lineno_prefix = "" - -- FIXME: Why is the +1 at the end needed? (Otherwise numbers are misaligned) - local lineno_max_width = #tostring(vim.api.nvim_buf_line_count(bufnr) - 1) + 1 + local lineno_max_width = #tostring(vim.api.nvim_buf_line_count(bufnr) - 1) if cfg.o.outline_items.show_symbol_lineno then -- Use max width-1 plus 1 space padding. -- -1 because if max_width is a power of ten, don't shift the entire lineno