(mapc #'delete-overlay linum-available)
(setq linum-available nil))))
+(defun linum--face-width (face)
+ (let ((info (font-info (face-font face)))
+ width)
+ (setq width (aref info 11))
+ (if (<= width 0)
+ (setq width (aref info 10)))
+ width))
+
(defun linum-update-window (win)
"Update line numbers for the portion visible in window WIN."
(goto-char (window-start win))
(let ((inhibit-point-motion-hooks t))
(forward-line))
(setq line (1+ line)))
+ (when (display-graphic-p)
+ (setq width (ceiling
+ (/ (* width 1.0 (linum--face-width 'linum))
+ (frame-char-width)))))
(set-window-margins win width (cdr (window-margins win)))))
(defun linum-after-change (beg end _len)