Dear Vim community,
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.
In pseudo-vimscript, the command currently behaves like this:
```
if (&modified)
confirmation dialog
else
display help in current window
endif
```
At a minimum, it should behave like this:
```
if (&modified && !&hidden)
if (&confirm)
confirmation dialog
else
error
endif
else
display help in current window
endif
```
This is closer to how commands that discard the buffer operate. There is more
room for improvement:
- Support for `<bang>` so that `:HelpCurWin!` forces the operation.
- Take into account special buffer options like 'buftype' and 'bufhidden'.
I am open to discussion and possibly submitting a patch.
Best wishes,
Hernán Ibarra Mejia
(
www.nagbu.net)