Bugs in man.vim and in tests for man.vim

32 views
Skip to first unread message

Jason Franklin

unread,
Jun 20, 2019, 7:42:41 AM6/20/19
to vim...@googlegroups.com
Greetings,

I have noticed and fixed a small bug with the man.vim plugin. To
reproduce:

1. vim --clean
2. :set hidden
3. :runtime ftplugin/man.vim
4. :ls
5. :Man vim
6. :q
7. :Man vim
8. :ls

Notice now that there is an additional listed buffer created for no
reason. I have written an automated test for this issue that currently
fails. The test is attached.

Notice in the changes to the test script that I added "unlet
g:ft_man_open_mode" to the first test. This variable was polluting the
later tests so that they wouldn't run properly (they would always see
this as "tab" unless it was reset).

The patch that fixes these problems is also attached.

Essentially, my change avoids running ":new" without an argument which
will create a superfluous, empty buffer.

All existing tests continue to pass.

Thanks,
Jason Franklin
man.patch
test.patch

Jason Franklin

unread,
Jun 20, 2019, 7:48:29 AM6/20/19
to vim_dev
man.patch
test.patch

Jason Franklin

unread,
Jun 20, 2019, 7:48:29 AM6/20/19
to vim-dev, gow...@gmail.com
Thanks,
Jason Franklin
man.patch
test.patch

Jason Franklin

unread,
Jul 20, 2019, 9:19:49 AM7/20/19
to vim_dev
Hey Bram,

Just a friendly bump on this patch. The original maintainer of this plugin didn't respond to my request for a fix.

Also, sorry for spamming the list here... I was working with a new email set-up at the time, and some error messages caused me to send the above a few to many times.

Thanks,
Jason Franklin

Reply all
Reply to author
Forward
0 new messages