aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2017-06-19 07:49:43 +0200
committerEivind Fonn <evfonn@gmail.com>2017-06-22 10:24:49 +0200
commit76700a90d127fbd6eb6cd4ff7cb04fc6b8f64aa3 (patch)
treee410610b0fb837c3eee65055c72bc066e321e9a8 /evil-tests.el
parentf371f2c6fdd57a939502f5032a8d93cd71493d0d (diff)
Keep Emacs from clearing text properties on yank
This should be safe to do as Evil already does this with the pasted text. Closes #855
Diffstat (limited to 'evil-tests.el')
-rw-r--r--evil-tests.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/evil-tests.el b/evil-tests.el
index fb509ac..de5ca12 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -2676,7 +2676,19 @@ This bufferThis bufferThis buffe[r];; and for Lisp evaluation."))
("p")
";; This buffer is for notes you don't want to save.;;
;; If you want to create a file, visit that file wi;; th C-x C-f,
-;; then enter the text in that file's own buffer. ;;")))
+;; then enter the text in that file's own buffer. ;;"))
+ (ert-info ("Paste preserves preceding text properties")
+ (evil-test-buffer
+ "[;]; This buffer is for notes you don't want to save.
+;; If you want to create a file, visit that file with C-x C-f,
+;; then enter the text in that file's own buffer."
+ (put-text-property (point) (line-end-position) 'font-lock-face 'warning)
+ ("yyp")
+ ";; This buffer is for notes you don't want to save.
+[;]; This buffer is for notes you don't want to save.
+;; If you want to create a file, visit that file with C-x C-f,
+;; then enter the text in that file's own buffer."
+ (should (equal (get-text-property (point-min) 'font-lock-face) 'warning)))))
(ert-deftest evil-test-paste-pop-before ()
"Test `evil-paste-pop' after `evil-paste-before'"