Reputation: 22043
Every time I invoke vterm, it create a new window below as C :
+------------+------------+
| A | B |
+------------+------------+
| C |
+-------------------------+
I am aware it invoke display-buffer
to act this way.
How could let display-buffer
to create a buffer from other window if it exist, rather than generate a third window?
+------------+------------+
| A | C |
+------------+------------+
Upvotes: 3
Views: 240
Reputation: 41
You can configure it with display-buffer-alist.
For example:
(add-to-list 'display-buffer-alist
'((lambda (buff-name _) (with-current-buffer buff-name (equal major-mode 'vterm-mode)))
(display-buffer-reuse-window display-buffer-in-side-window)
(side . bottom)
(reusable-frames . visible)
(window-height . 0.4)))
Upvotes: 2