Fix over-aggressive pin truncation

Would truncate the rest of the buffer in some cases.
This commit is contained in:
Henrik Lissner 2020-04-30 02:31:51 -04:00
parent 64c2efa2fc
commit 106f3324e8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -228,10 +228,11 @@ verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'."
(goto-char (match-beginning 0))
(and (stringp (plist-get (sexp-at-point) :pin))
(search-forward ":pin" nil t)
(put-text-property (re-search-forward "\"[^\"]\\{10\\}" nil t)
(progn (re-search-forward "\"" nil t)
(match-beginning 0))
'display "...")))
(let ((start (re-search-forward "\"[^\"]\\{10\\}" nil t))
(finish (and (re-search-forward "\"" (line-end-position) t)
(match-beginning 0))))
(when (and start finish)
(put-text-property start finish 'display "...")))))
nil)
;;;###autoload