From 74fcc9452cd99680a9f4aad255e90204966f74c3 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 19 Mar 2025 04:17:00 -0700 Subject: fix(runtime): gO always says "Help TOC" #32971 Problem: gO always says "Help TOC". Solution: Use a generic title instead. --- runtime/lua/vim/treesitter/_headings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/treesitter/_headings.lua b/runtime/lua/vim/treesitter/_headings.lua index 4e8833c93a..885d014a89 100644 --- a/runtime/lua/vim/treesitter/_headings.lua +++ b/runtime/lua/vim/treesitter/_headings.lua @@ -87,7 +87,7 @@ local get_headings = vim.func._memoize(hash_tick, function(bufnr) return headings end) ---- Show a table of contents for the help buffer in a loclist +--- Shows an Outline (table of contents) of the current buffer, in the loclist. function M.show_toc() local bufnr = api.nvim_get_current_buf() local headings = get_headings(bufnr) @@ -104,7 +104,7 @@ function M.show_toc() end end vim.fn.setloclist(0, headings, ' ') - vim.fn.setloclist(0, {}, 'a', { title = 'Help TOC' }) + vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' }) vim.cmd.lopen() end -- cgit