From c59ae5d172c9c4b044c597bfdcf35c01e2d3eb8e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 11 Oct 2020 16:23:31 -0400 Subject: [PATCH] Stop ws-butler from corrupting undo history #4071 --- core/core-editor.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index e036de693..4e8a71479 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -565,7 +565,13 @@ files, so we replace calls to `pp' with the much faster `prin1'." (use-package! ws-butler ;; a less intrusive `delete-trailing-whitespaces' on save - :hook (doom-first-buffer . ws-butler-global-mode)) + :hook (doom-first-buffer . ws-butler-global-mode) + :config + ;; ws-butler normally preserves whitespace in the buffer (but strips it from + ;; the written file). While sometimes convenient, this behavior is not + ;; intuitive. To the average user it looks like whitespace cleanup is failing, + ;; which causes folks to redundantly install their own. + (setq ws-butler-keep-whitespace-before-point nil)) (provide 'core-editor) ;;; core-editor.el ends here