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

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

[nongnu] elpa/page-break-lines ac91cf5703 25/80: Always shorten rule by


From: ELPA Syncer
Subject: [nongnu] elpa/page-break-lines ac91cf5703 25/80: Always shorten rule by 1 character relative to window width
Date: Tue, 5 Sep 2023 04:03:05 -0400 (EDT)

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

    Always shorten rule by 1 character relative to window width
    
    With Emacs 24.4, this seems to yield a full-length rule without a gap at
    right. On older versions, it might cause the rule to be too short. It
    might be necessary to include an Emacs version check for optimal
    behaviour.
---
 page-break-lines.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/page-break-lines.el b/page-break-lines.el
index dabfefad5e..af948a0566 100644
--- a/page-break-lines.el
+++ b/page-break-lines.el
@@ -89,14 +89,13 @@ If the buffer inside WINDOW has `page-break-lines-mode' 
enabled,
 its display table will be modified as necessary."
   (with-current-buffer (window-buffer window)
     (if page-break-lines-mode
-        (progn
+        (let ((width (- (window-width window) 1)))
           (unless buffer-display-table
             (setq buffer-display-table (make-display-table)))
           (aset buffer-display-table ?\^L
                 (vconcat (mapcar (lambda (c)
                                    (make-glyph-code c 'page-break-lines))
-                                 (make-list (- (window-width window)
-                                               (if (or word-wrap (null 
window-system)) 1 0))
+                                 (make-list width
                                             page-break-lines-char)))))
       (when buffer-display-table
         (aset buffer-display-table ?\^L nil)))))



reply via email to

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