From f0ce0c471844aa97f5edaa7851807b84e283ae7e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 23 Mar 2016 11:52:19 -0400 Subject: [PATCH] Don't delete trailing ws on current line (if in insert mode) --- core/core-editor.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index b8dad34f2..af65513e0 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -92,7 +92,8 @@ enable multiple minor modes for the same regexp.") (line-beginning-position) (line-end-position)))) ad-do-it - (when (string-match-p "^[\s\t]*$" linestr) + (when (and (evil-insert-state-p) + (string-match-p "^[\s\t]*$" linestr)) (insert linestr)))) ;; If file is oversized...