Skip to content

Commit

Permalink
fix negative available-width
Browse files Browse the repository at this point in the history
  • Loading branch information
kiennq committed Oct 6, 2019
1 parent 4f8aebe commit fe7b723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mini-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ When ARG is:
"Render the LEFT and RIGHT part of mini-modeline."
(let* ((left (or left ""))
(right (or right ""))
(available-width (- (frame-width mini-modeline-frame) (string-width left) 3))
(available-width (max (- (frame-width mini-modeline-frame) (string-width left) 3) 0))
(required-width (string-width right)))
(if (< available-width required-width)
(if mini-modeline-truncate-p
Expand Down

0 comments on commit fe7b723

Please sign in to comment.