diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-07-15 09:16:09 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-07-15 09:16:09 +0200 |
| commit | 731642756f504c8a56d3775960b7af0a93c618bb (patch) | |
| tree | cea3d2f3d86bf9e2e57e098218d99e19eaefe93e /docs/magit.texi | |
| parent | fddd31558ce3cf3c22c811c1147d0ce3a039f44e (diff) | |
Don't kill blob buffers when displayed in multiple windows
Previously "q" in a blob buffer unconditionally killed it. I have
a personal command that displays the current buffer in a new frame
(while still displaying it in the old window/frame), which I often
follow up by quitting the current buffer in the old window, which
then ends up killing the buffer "in both frames".
On the other hand, when time traveling, it is useful if "q" cleans
up completely, else we would end up with many blob buffers, which
are no longer of interest.
Determining whether to kill or only bury the current buffer based on
whether it is displayed in a second window, covers both use-cases.
Other users might find different behaviors useful, so implement and
mention some alternatives.
Diffstat (limited to 'docs/magit.texi')
| -rw-r--r-- | docs/magit.texi | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/docs/magit.texi b/docs/magit.texi index 9fc283b..3e3f92a 100644 --- a/docs/magit.texi +++ b/docs/magit.texi @@ -9755,19 +9755,25 @@ bindings, but this might be extended. @item @kbd{p} (@code{magit-blob-previous}) @kindex p @findex magit-blob-previous -Visit the previous blob which modified the current file. +This command visits the previous blob that modified the current +file. @item @kbd{n} (@code{magit-blob-next}) @kindex n @findex magit-blob-next -Visit the next blob which modified the current file. +This command visit the next blob that modified the current file. -@item @kbd{q} (@code{magit-kill-this-buffer}) +@item @kbd{q} (@code{magit-bury-or-kill-buffer}) @kindex q -@findex magit-kill-this-buffer -Kill the current buffer. +@findex magit-bury-or-kill-buffer +This command buries the current buffer, if that is being displayed +in multiple windows and/or when a prefix argument is used. If +neither is the case, it instead kills the current buffer. @end table +You might want to bind @code{u} to another command. Suitable commands +include @code{bury-buffer}, @code{magit-bury-buffer} and @code{magit-kill-this-buffer}. + @node Customizing @chapter Customizing |
