aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-03-08 14:11:24 +0100
committermarty hiatt <martianhiatus@riseup.net>2024-03-08 14:11:42 +0100
commit623e29d6d50e68cf6f8e8714cae92c4b704264a3 (patch)
tree1ac5a11d53b1facfe47ca639b22fa738a3d24651
parentf807db692bc83f4f1000dbdd43e92153a5264d30 (diff)
customise no-fill-on-render. FIX: #532
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 9a3c798..4034ebf 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -122,6 +122,11 @@ By default fixed width fonts are used."
:type '(boolean :tag "Enable using proportional rather than fixed \
width fonts when rendering HTML text"))
+(defcustom mastodon-tl--no-fill-on-render nil
+ "Non-nil to disable filling by shr.el while rendering toot body.
+Use this if your setup isn't compatible with shr's window width filling."
+ :type '(boolean))
+
(defcustom mastodon-tl--display-media-p t
"A boolean value stating whether to show media in timelines."
:type 'boolean)
@@ -777,7 +782,9 @@ links in the text. If TOOT is nil no parsing occurs."
(insert string)
(let ((shr-use-fonts mastodon-tl--enable-proportional-fonts)
(shr-width (when mastodon-tl--enable-proportional-fonts
- (- (window-width) 3))))
+ (if mastodon-tl--no-fill-on-render
+ 0
+ (- (window-width) 3)))))
(shr-render-region (point-min) (point-max)))
;; Make all links a tab stop recognized by our own logic, make things point
;; to our own logic (e.g. hashtags), and update keymaps where needed: