Skip to content

Commit

Permalink
Solve args-out-of-range by ensuring positive 'size' in sml/generate-m…
Browse files Browse the repository at this point in the history
…inor-modes
  • Loading branch information
mola-T committed May 5, 2016
1 parent 9715b51 commit 0e9cae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smart-mode-line.el
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ duplicated buffer names) from being displayed."
needs-removing filling)

;; Calculate whether truncation is necessary.
(when (and sml/shorten-modes (> (string-width finalNameList) size))
(when (and sml/shorten-modes (> size 0) (> (string-width finalNameList) size))
;; We need to remove 1+ "the number of spaces found".
(setq needs-removing
(1+
Expand Down

0 comments on commit 0e9cae8

Please sign in to comment.