absolute value + regular font size
This commit is contained in:
parent
1851b3418d
commit
5a513a957c
|
@ -3,7 +3,7 @@
|
|||
(defun my-linum-get-format-string ()
|
||||
(let* ((width (1+ (length (number-to-string
|
||||
(count-lines (point-min) (point-max))))))
|
||||
(format (concat "%" (number-to-string width) "d")))
|
||||
(format (concat "%" (number-to-string width) "d ")))
|
||||
(setq my-linum-format-string format)))
|
||||
|
||||
(defvar my-linum-current-line-number 0)
|
||||
|
@ -11,12 +11,12 @@
|
|||
(setq linum-format 'my-linum-relative-line-numbers)
|
||||
|
||||
(defun my-linum-relative-line-numbers (line-number)
|
||||
(let ((offset (- line-number my-linum-current-line-number)))
|
||||
(let ((offset (abs (- line-number my-linum-current-line-number))))
|
||||
(propertize (format my-linum-format-string offset) 'face 'linum)))
|
||||
|
||||
(defadvice linum-update (around my-linum-update)
|
||||
(let ((my-linum-current-line-number (line-number-at-pos)))
|
||||
ad-do-it))
|
||||
(ad-activate 'linum-update)
|
||||
(custom-set-faces
|
||||
'(linum ((t (:inherit (shadow) :height 0.8)))))
|
||||
;(custom-set-faces
|
||||
; '(linum ((t (:inherit (shadow) :height 0.8)))))
|
||||
|
|
Loading…
Reference in New Issue