bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12428: 23.4; Add padding for rendering of the line numbers by linum-


From: Stefan Monnier
Subject: bug#12428: 23.4; Add padding for rendering of the line numbers by linum-mode
Date: Fri, 26 Oct 2012 12:47:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> I was experiencing the issue discussed here at StackOverflow
> http://stackoverflow.com/questions/4920210/what-causes-this-graphical-error-in-emacs-with-linum-mode-on-os-x.

I'm not sure I understand what is the problem there.  Is it really
a display glitch where the fringe is displayed on top of the margin?
If so, that's just a bug that needs fixing.  I.e. please provide
a recipe (I haven't bumped into such a display glitch in my tests
of linum.el).

If it's not a display glitch, can you explain what it is?

> +(defcustom linum-margin-padding 0
> +  "Padding added to the left margin when displaying the line numbers.
> +Should be a positive integer. A value between 1 and 5 is probably 
> sufficient."

While I don't think it's "useful in theory", I do see that it could be
useful in practice to work around problems due to variable-pitch fonts,
for example, where linum.el is not able to correctly compute the actual
width that the text will need.

> -        (setq width (max width (length str)))
> +        (setq width (max width (+ (length str) linum-margin-padding)))

Why not add linum-margin-padding only at the end, in the call to
set-window-margins?


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]