aboutsummaryrefslogtreecommitdiff
path: root/docs/magit.org
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-07-15 09:16:09 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-07-15 09:16:09 +0200
commit731642756f504c8a56d3775960b7af0a93c618bb (patch)
treecea3d2f3d86bf9e2e57e098218d99e19eaefe93e /docs/magit.org
parentfddd31558ce3cf3c22c811c1147d0ce3a039f44e (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.org')
-rw-r--r--docs/magit.org14
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/magit.org b/docs/magit.org
index 4acd600..95b981f 100644
--- a/docs/magit.org
+++ b/docs/magit.org
@@ -8075,15 +8075,21 @@ bindings, but this might be extended.
- Key: p (magit-blob-previous) ::
- Visit the previous blob which modified the current file.
+ This command visits the previous blob that modified the current
+ file.
- Key: n (magit-blob-next) ::
- Visit the next blob which modified the current file.
+ This command visit the next blob that modified the current file.
+
+- Key: q (magit-bury-or-kill-buffer) ::
-- Key: q (magit-kill-this-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.
- Kill the current buffer.
+You might want to bind ~u~ to another command. Suitable commands
+include ~bury-buffer~, ~magit-bury-buffer~ and ~magit-kill-this-buffer~.
* Customizing