diff --git a/modules/term/eshell/autoload/eshell.el b/modules/term/eshell/autoload/eshell.el index 5b95c761a..198b18269 100644 --- a/modules/term/eshell/autoload/eshell.el +++ b/modules/term/eshell/autoload/eshell.el @@ -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)) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 9cabb61b1..42c9650e5 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -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 ?\ ))) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 278255630..0c5679706 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -256,14 +256,15 @@ Uses `shrink-window-if-larger-than-buffer'." (defun +popup-adjust-fringes-h () "Hides the fringe in popup windows, restoring them if `+popup-buffer-mode' is disabled." - (let ((f (if (bound-and-true-p +popup-buffer-mode) 0))) - (set-window-fringes nil f f fringes-outside-margins))) + (when (+popup-window-p) + (let ((f (if (bound-and-true-p +popup-buffer-mode) 0))) + (set-window-fringes nil f f fringes-outside-margins)))) ;;;###autoload (defun +popup-adjust-margins-h () "Creates padding for the popup window determined by `+popup-margin-width', restoring it if `+popup-buffer-mode' is disabled." - (when +popup-margin-width + (when (and +popup-margin-width (+popup-window-p)) (unless (memq (window-parameter nil 'window-side) '(left right)) (let ((m (if (bound-and-true-p +popup-buffer-mode) +popup-margin-width))) (set-window-margins nil m m)))))