summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-03-09 14:57:07 +0800
committerJSDurand <mmemmew@gmail.com>2024-03-09 14:57:07 +0800
commit278d694d9971d20e9cf393564a33e8915186418b (patch)
tree7520d1497f199de9b01054aac004026d73fd343d
parente52d08aa0ebb9351dd3afce5cbe82fcfb3746ef1 (diff)
view: Adjust the buffer for listing processes
* view-conf.el (durand-view-process): Fit the window to buffer with a maximal height of 0.3 * total height, so that this buffer does not disturb the main view.
-rw-r--r--view-conf.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/view-conf.el b/view-conf.el
index 09f70ee..2726526 100644
--- a/view-conf.el
+++ b/view-conf.el
@@ -162,7 +162,9 @@ connected: %s, cycles: %d, condition: %s"
(interactive "P")
(cond
((equal arg (list 4))
- (list-processes))
+ (list-processes)
+ (let ((window (get-buffer-window "*Process List*")))
+ (cond (window (durand-fit-window-to-buffer-with-max window)))))
((equal arg (list 16))
(proced))
((message "%s" (process-list)))))