runtime(doc): Clarify :bd behaviour

Commit: 
https://github.com/vim/vim/commit/48cee53615069e3a5a04be265440180e29f9997a
Author: Christian Brabandt <[email protected]>
Date:   Fri Feb 13 20:53:49 2026 +0000

    runtime(doc): Clarify :bd behaviour
    
    closes: https://github.com/vim/vim/issues/19389
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 7b8248655..d585669f4 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt*  For Vim version 9.1.  Last change: 2025 Dec 03
+*windows.txt*  For Vim version 9.1.  Last change: 2026 Feb 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1210,15 +1210,22 @@ list of buffers. |unlisted-buffer|
 :bd[elete][!] [N]
                Unload buffer [N] (default: current buffer) and delete it from
                the buffer list.  If the buffer was changed, this fails,
-               unless when [!] is specified, in which case changes are lost.
+               unless [!] is specified, in which case changes are lost.
                The file remains unaffected.  Any windows for this buffer are
                closed.  If buffer [N] is the current buffer, another buffer
                will be displayed instead.  This is the most recent entry in
                the jump list that points into a loaded buffer.
+
                Actually, the buffer isn't completely deleted, it is removed
                from the buffer list |unlisted-buffer| and option values,
                variables and mappings/abbreviations for the buffer are
-               cleared.  Examples: >
+               cleared.  If [N] is the last listed buffer in a window (i.e.,
+               there is no other listed buffer to switch to), the buffer is
+               emptied instead of being unloaded.  The window is not closed,
+               and the buffer may be reused as a new buffer |buffer-reuse|.
+               This ensures every window always has a valid buffer.
+
+               Examples: >
                    :.,$-bdelete    " delete buffers from the current one to
                                    " last but one
                    :%bdelete       " delete all buffers

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vr0Gh-00Abaz-Fr%40256bit.org.

Raspunde prin e-mail lui