]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak shr link text property adjustments when folding
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 19:11:05 +0000 (21:11 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 19:11:05 +0000 (21:11 +0200)
* lisp/net/shr.el (shr-fill-line): If a link starts at the first
word on a new folded line, then don't copy the link properties to
the newline inserted.

lisp/net/shr.el

index fb17b856f4492b97790e6acdbde745b23041346c..d12ee68493726685097aaa2c58548dab0cadd797 100644 (file)
@@ -734,10 +734,10 @@ size, and full-buffer size."
            (skip-chars-forward " ")
            (search-forward " " (line-end-position) 'move)))
       ;; Success; continue.
-      (when (= (preceding-char) ?\s)
-       (delete-char -1))
       (let ((props (copy-sequence (text-properties-at (point))))
            (gap-start (point)))
+        (when (= (preceding-char) ?\s)
+         (delete-char -1))
         ;; We don't want to use the faces on the indentation, because
         ;; that's ugly, but we want all the other properties to be
         ;; continuous so that links do not split up into many links