Dear Vim community,
On Saturday, 16 May 2026, Hernán Ibarra Mejia wrote:
> I like the recently added package helpcurwin, which displays help pages in the
> current window (rather than a split). However, there is a confirmation dialog
> that appears using `:HelpCurWin` when the current buffer is modified. This is
> annoying and inconsistent with the behaviour of other commands that have to
> solve the same problem—`:edit` being the prime example.
I attach a patch to solve this issue. It is my first time contributing to Vim
(apart from bug reports and trivial changes) so please tell me if I need to
correct something.
I noticed other issues with the package that I didn't address in this patch.
- The `-bar` option is on for HelpCurwin but this makes `:HelpCurwin |` not
work, whereas `:help |` does. I think the `-bar` option should be removed.
- The new buffer is currently created with `keepalt noautocmd enew` but I don't
know why noautocmd should be included, and I'd like for the alternate buffer
to change so that after `:HelpCurwin` one can use CTRL-^ to go back
- The <Plug>HelpCurwin; mapping uses <cWORD> when I think it should use <cword>,
since the latter is configurable and is supposed to match keywords.
I am happy to include fixes for these in my patch or open separate threads if
needed.
Best wishes,
Hernán