mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
patch 9.1.1599: :bnext doesn't go to unlisted help buffers
Problem: :bnext doesn't go to unlisted help buffers when cycling
through help buffers (after 9.1.0557).
Solution: Don't check if a help buffer is listed (zeertzjq).
From <https://github.com/vim/vim/issues/4478#issuecomment-498831057>:
> I think we should fix that, since once you get to a non-help buffer
> all unlisted buffers are skipped, thus you won't encounter another
> help buffer.
This implies that cycling through help buffers should work even if help
buffers are unlisted. Otherwise this part of :bnext isn't really useful,
as :h makes help buffers unlisted by default.
related: #4478
related: #15198
closes: #17913
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9c4de84b2d
commit
9662f33480
@@ -167,6 +167,17 @@ func Test_bnext_bprev_help()
|
||||
b XHelp1
|
||||
blast | call assert_equal(b4, bufnr())
|
||||
|
||||
" Cycling through help buffers works even if they aren't listed.
|
||||
b XHelp1
|
||||
setlocal nobuflisted
|
||||
bnext | call assert_equal(b3, bufnr())
|
||||
bnext | call assert_equal(b1, bufnr())
|
||||
bprev | call assert_equal(b3, bufnr())
|
||||
setlocal nobuflisted
|
||||
bprev | call assert_equal(b1, bufnr())
|
||||
bprev | call assert_equal(b3, bufnr())
|
||||
bnext | call assert_equal(b1, bufnr())
|
||||
|
||||
%bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user