vim-patch:9.1.0557: moving in the buffer list doesn't work as documented (#29653)

Problem:  moving in the buffer list doesn't work as documented
          (SenileFelineS)
Solution: Skip non-help buffers, when run from normal buffers, else
          only move from help buffers to the next help buffer (LemonBoy)

As explained in the help section for :bnext and :bprev the commands
should jump from help buffers to help buffers (and from regular ones to
regular ones).

fixes: vim/vim#4478
closes: vim/vim#15198

893eeeb445

Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
zeertzjq
2024-07-11 08:02:59 +08:00
committed by GitHub
parent afbe7736a4
commit 45b7a2c503
4 changed files with 97 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ enum bln_values {
BLN_NOCURWIN = 128, ///< buffer is not associated with curwin
};
/// Values for action argument for do_buffer()
/// Values for action argument for do_buffer_ext() and close_buffer()
enum dobuf_action_values {
DOBUF_GOTO = 0, ///< go to specified buffer
DOBUF_SPLIT = 1, ///< split window and go to specified buffer
@@ -48,7 +48,7 @@ enum dobuf_action_values {
DOBUF_WIPE = 4, ///< delete specified buffer(s) really
};
/// Values for start argument for do_buffer()
/// Values for start argument for do_buffer_ext()
enum dobuf_start_values {
DOBUF_CURRENT = 0, ///< "count" buffer from current buffer
DOBUF_FIRST = 1, ///< "count" buffer from first buffer
@@ -56,6 +56,13 @@ enum dobuf_start_values {
DOBUF_MOD = 3, ///< "count" mod. buffer from current buffer
};
/// Values for flags argument of do_buffer_ext()
enum dobuf_flags_value {
DOBUF_FORCEIT = 1, ///< :cmd!
DOBUF_SKIPHELP = 4, ///< skip or keep help buffers depending on b_help of the
///< starting buffer
};
/// flags for buf_freeall()
enum bfa_values {
BFA_DEL = 1, ///< buffer is going to be deleted