Skip to content

Commit

Permalink
Merge pull request #44 from liuyinz/fix/error-of-max-char-minus-one
Browse files Browse the repository at this point in the history
fix: error when window width is extremely small
  • Loading branch information
purcell authored Sep 11, 2024
2 parents d4536b2 + 6ba6789 commit 4a20d4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion page-break-lines.el
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ its display table will be modified as necessary."
(/ (float (string-pixel-width (make-string 100 page-break-lines-char)))
(string-pixel-width (make-string 100 ?a)))
(char-width page-break-lines-char)))
(width (floor (window-max-chars-per-line) char-relative-width))
(width (floor (max 0 (window-max-chars-per-line)) char-relative-width))
(width (if page-break-lines-max-width
(min width page-break-lines-max-width)
width))
Expand Down

0 comments on commit 4a20d4a

Please sign in to comment.