- (let ((width (ceiling
- ;; We'd really want to check the widths rather than the
- ;; heights, but it's a start.
- (/ (* nlinum--width 1.0
- (nlinum--face-height 'linum))
- (frame-char-height)))))
+ (let ((width (if (display-graphic-p)
+ (ceiling
+ ;; We'd really want to check the widths rather than the
+ ;; heights, but it's a start.
+ (/ (* nlinum--width 1.0
+ (nlinum--face-height 'linum))
+ (frame-char-height)))
+ nlinum--width)))