mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(eshell): disable undo while process is executing
After further experimentation these will be replaced with named functions.
This commit is contained in:
@ -85,6 +85,16 @@ You should use `set-eshell-alias!' to change this.")
|
||||
(add-hook 'eshell-mode-hook #'+eshell-init-h)
|
||||
(add-hook 'eshell-exit-hook #'+eshell-cleanup-h)
|
||||
|
||||
;; UX: Temporarily disable undo history between command executions. Undo can
|
||||
;; destroy output while it's being printed to stdout.
|
||||
(let (old-undo-list)
|
||||
(add-hook! 'eshell-pre-command-hook
|
||||
(setq old-undo-list buffer-undo-list
|
||||
buffer-undo-list nil))
|
||||
(add-hook! 'eshell-post-command-hook
|
||||
(setq buffer-undo-list old-undo-list)
|
||||
(clrhash undo-equiv-table)))
|
||||
|
||||
;; Enable autopairing in eshell
|
||||
(add-hook 'eshell-mode-hook #'smartparens-mode)
|
||||
|
||||
|
Reference in New Issue
Block a user