Opens Unnecessary Hidden Buffers When `g:startify_lists` is Set
- Dominant language
- Vim Script
- Stars
- 5.4k
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
I have created a minimal vimrc that reproduces this problem: [vimrc-startify-only.txt](https://github.com/mhinz/vim-startify/files/5398463/vimrc-startify-only.txt)
When batch-loading multiple files, startify creates multiple hidden buffers for files which were selected. The bug only appears to happen `g:startify_lists`, as omitting this causes Startify to open buffers normally. This behavior appears to be identical between classic Vim and Neovim.
These are the steps I have used to reproduce this problem:
1. Run [n]`vim -u vimrc-startify-only.txt`; do not pass any files as arguments.
2. Scroll down to 'Recent Files' (not the one with the tilde in the name), and place cursor on second element from top. Select that one and the one directly below with 'b'; press enter to open the buffers.
3. After opening the files, executing `:ls!` will reveal multiple hidden buffers, with paths matching those of other recent files.
Expected behavior: Startify opens only the two needed files, without creating any hidden buffers.
Edit: I have updated this post to reflect my recent discoveries.
Edit 2: Updated title. I was able to cause this behavior by opening a single buffer through the following steps:
1. Run with `nvim -u vimrc-startify-only.txt`
2. Scroll down to 'Recent Files' and select the first list element
3. Run `ls!`
Contributor guide
Research direction
Start with the attached vimrc-startify-only.txt and reproduce the issue using the listed Vim or Neovim steps. Compare behavior with and without g:startify_lists, then use :ls! to inspect the resulting buffers. Done means selecting one or two Recent Files opens only those files and creates no additional hidden buffers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100