emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/page-break-lines 67b5928a7f 38/80: Keep the correct ine wi


From: ELPA Syncer
Subject: [nongnu] elpa/page-break-lines 67b5928a7f 38/80: Keep the correct ine width even when text-scale-mode is active
Date: Tue, 5 Sep 2023 04:03:06 -0400 (EDT)

branch: elpa/page-break-lines
commit 67b5928a7f14568baf2716b5741e13659a86b9ea
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>

    Keep the correct ine width even when text-scale-mode is active
    
    Thanks @cpitclaudel!
---
 page-break-lines.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/page-break-lines.el b/page-break-lines.el
index ebb530dc16..11715799e2 100644
--- a/page-break-lines.el
+++ b/page-break-lines.el
@@ -125,11 +125,13 @@ its display table will be modified as necessary."
         (progn
           (unless buffer-display-table
             (setq buffer-display-table (make-display-table)))
-          (let* ((width (- (window-width window) 1))
-                 (glyph (make-glyph-code page-break-lines-char 
'page-break-lines))
-                 (new-display-entry (vconcat (make-list width glyph))))
-            (unless (equal new-display-entry (elt buffer-display-table ?\^L))
-              (aset buffer-display-table ?\^L new-display-entry))))
+          (let ((default-height (face-attribute 'default :height nil 
'default)))
+            (set-face-attribute 'page-break-lines nil :height default-height)
+            (let* ((width (- (window-width window) 1))
+                   (glyph (make-glyph-code page-break-lines-char 
'page-break-lines))
+                   (new-display-entry (vconcat (make-list width glyph))))
+              (unless (equal new-display-entry (elt buffer-display-table ?\^L))
+                (aset buffer-display-table ?\^L new-display-entry)))))
       (when buffer-display-table
         (aset buffer-display-table ?\^L nil)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]