branch: externals/olivetti
commit 38b2eb41ab1eace7581d787003b07190a0c83aef
Author: Paul Rankin <[email protected]>
Commit: Paul Rankin <[email protected]>
Limit window-width to 2* largest fringe
---
olivetti.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/olivetti.el b/olivetti.el
index c5a9035..09bc0e4 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -283,8 +283,8 @@ face, scale N by that factor, otherwise scale by 1."
(% olivetti-minimum-body-width 2))))
(setq window-width
(- window-width
- (/ (+ (car fringes) (cadr fringes))
- (frame-char-width (window-frame window)))
+ (/ (* (max (car fringes) (cadr fringes)) 2)
+ (float (frame-char-width (window-frame window))))
(% window-width 2)))
(cond ((integerp width)
(max (min width (floor window-width)) min-width))