mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-31 14:43:40 -05:00
fix(popup): fringe/margins adjusted in wrong window
Due to a race condition in some contexts, hooks that adjusted window fringes or margins weren't targeting the windows (usually popups) they were supposed to, often affecting the last selected window instead. This could cause the fringes (or margins) to resize or outright vanish unexpectedly in the wrong windows (e.g. after opening or killing a vterm or eshell popup). Fix: #8346
This commit is contained in:
@@ -120,6 +120,8 @@
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
(set-window-fringes nil 0 0)
|
||||
(set-window-margins nil 1 nil)
|
||||
(when command
|
||||
(+eshell-run-command command buf)))
|
||||
buf))
|
||||
|
@@ -92,9 +92,6 @@ You should use `set-eshell-alias!' to change this.")
|
||||
|
||||
;; UI enhancements
|
||||
(add-hook! 'eshell-mode-hook
|
||||
(defun +eshell-remove-fringes-h ()
|
||||
(set-window-fringes nil 0 0)
|
||||
(set-window-margins nil 1 nil))
|
||||
(defun +eshell-enable-text-wrapping-h ()
|
||||
(visual-line-mode +1)
|
||||
(set-display-table-slot standard-display-table 0 ?\ )))
|
||||
|
Reference in New Issue
Block a user