The description of :bdelete says:
https://github.com/vim/vim/blob/5b0889b8bf25b0793b1949ec965c94b623900aba/runtime/doc/windows.txt#L1200-L1203
The description of :bwipeout says:
https://github.com/vim/vim/blob/5b0889b8bf25b0793b1949ec965c94b623900aba/runtime/doc/windows.txt#L1226-L1228
Both of these mention clearing option settings. So - when are option settings actually cleared - on :bdelete, or only on :bwipeout when the buffer is "really" deleted? Does it depend on the setting?
Clearer documentation for what information is cleared on bdelete vs bwipeout.
9.0.1712
.
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The buffer-local options are cleared for both the ":bdelete" and the ":bwipeout" commands. Note that you can wipeout a buffer using the ":bwipeout" command without first deleting the buffer using the ":bdelete" command. You can also use the ":bdelete" command to delete a buffer without wiping out the buffer. In both cases, the buffer-local options will be cleared.
Refer to the following code:
https://github.com/vim/vim/blob/master/src/buffer.c#L940
https://github.com/vim/vim/blob/master/src/buffer.c#L786
https://github.com/vim/vim/blob/master/src/buffer.c#L778
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Got it - I think "option settings are lost" in the wipeout text is confusing then - a different example should be chosen, e.g., buffer-local autocmds are cleared.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
so this can be closed?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
but both commands are clearing out buffer-local options. Isn't that clear? Do you have a doc improvement?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
This :bwipeout text is contrasting it with what :bdelete does. It's "like :bdelete", but also does . So it's misleading to include something in that list that :bdelete also does. As I said above, a different example should be chosen, e.g., buffer-local autocmds being cleared.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I don't read that as contrasting:
Like bdelete, but really delete the buffer. so everything is lost. And then come examples of what all will be lost (but that does not relate or contrast to what :bd does but are just examples of what all will be lost when using bwipeout). Yes, bdelete may also delete part of that, but that is not the point here.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
FWIW: I wrote the previous comment, after I started looking at the help file and was trying to clarify the docs as part of #12790
But I don't think this is required. So let me close this. Thanks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #12809 as not planned.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()