commit d22fcf2917465aff029e781080dcc8c582c93f0e
parent 85d33514f999c5e68b15321f3ed86abc07d18580
Author: altermo <107814000+altermo@users.noreply.github.com>
Date: Tue, 27 May 2025 14:38:45 +0200
fix(gO): use non-breaking space #34197
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/treesitter/_headings.lua b/runtime/lua/vim/treesitter/_headings.lua
@@ -93,7 +93,8 @@ function M.show_toc()
end
-- add indentation for nicer list formatting
for _, heading in pairs(headings) do
- heading.text = (' '):rep(heading.level - 1) .. heading.text
+ -- Quickfix trims whitespace, so use non-breaking space instead
+ heading.text = ('\194\160'):rep(heading.level - 1) .. heading.text
end
vim.fn.setloclist(0, headings, ' ')
vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })