emacs-devel
[Top][All Lists]
Advanced

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

Re: Native display of line numbers


From: Yuri Khan
Subject: Re: Native display of line numbers
Date: Sun, 18 Jun 2017 18:03:18 +0700

On Sat, Jun 17, 2017 at 10:12 PM, Eli Zaretskii <address@hidden> wrote:

> I came up with an implementation of a native
> display of line numbers.  You can find it in the scratch/line-numbers
> branch of the Emacs repository.

It is nice to have native line numbers. They work with a non-default
background, correctly handle line wrapping, and even when their face
is customized to a smaller size. (In a larger size, their tops get
truncated, but that’s firmly in the “don’t to that, then” territory.)

But now we have three facilities that can display auxiliary
information around the buffer text: margin, fringe, and line numbers,
all with their own unique limitations:

* The margin’s limitation is that its overall background is defined by
the default face. Fragments of text are displayed in the margin can
specify their own background, but the space where nothing is displayed
is always the same color as the buffer. Also, overlay performance.

* The fringe can only display bitmaps, only monochrome bitmaps, and
only bitmaps at native display resolution. Which makes all bitmaps
that are designed for low resolution displays unreadably tiny on a
HiDPI display.

* And the line numbers area only displays line numbers.


The relative ordering of the margin and fringe can be customized with
‘fringes-outside-margins’ but line numbers are always inside both of
those. That means a line number area with a non-default background
color will visually divide the display. Also, the line wrapping
indicator in the fringe is visually separated from the wrapped line.
IMO, it should be possible to put the fringe, and maybe the margin,
inside line numbers.



reply via email to

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