]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(helptoc): reload cached g:helptoc.shell_prompt when starting toc
authorD. Ben Knoble <ben.knoble+github@gmail.com>
Sun, 1 Dec 2024 15:06:18 +0000 (16:06 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 1 Dec 2024 15:06:18 +0000 (16:06 +0100)
commitc74a87eea2cffe911dc5741ca29199165bea631e
treeca1f05d7226fa4d82529db9b4e55488abfee9a92
parentc7a96d6d1a3beaae65f321852bf57e2853f34a2a
runtime(helptoc): reload cached g:helptoc.shell_prompt when starting toc

Follow up on PR 10446 [1] so that changes at run-time (or after loading
a vimrc) are reflected at next use. Instead of "uncaching" the variable
by computing SHELL_PROMPT on each use, which could negatively impact
performance, reload any user settings before creating the TOC.

Also make sure, changes to the shell prompt variable do correctly
invalidate b:toc, so that the table of content is correctly re-created
after user makes any changes.

[1]: https://github.com/vim/vim/pull/10446#issuecomment-2485169333

closes: #16097

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim