[Top][All Lists]

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

Re: Native line numbers, final testing

From: Richard Copley
Subject: Re: Native line numbers, final testing
Date: Tue, 4 Jul 2017 17:35:16 +0100

On 3 July 2017 at 16:24, Eli Zaretskii <address@hidden> wrote:

> Maybe with C-n/C-p people will expect what you expected in the case of
> line numbers (but I'd like to hear more opinions before I'm convinced
> to change the code to do that)

In my opinion it is important for the column position resulting from
C-n and C-p to be simple and predictable. I often rely on those
commands in keyboard macros. A simple example:

C-d 0 C-b C-n
C-d 1 C-b C-n
C-d 2 C-p C-p

This is supposed to change the character at point to 0 and the
characters in the corresponding column in the next two lines to 1
and 2.

I think that's a common use case and it won't work if
display-line-numbers is on ...

Or will it? I'm afraid I got quite confused trying to test this.
I think I found a different bug. Recipe:

Open xdisp.c and go to line 30, column 30.
Type "C-d C-n C-d C-n C-d C-n C-d C-n"
The first C-n goes to column 30 on line 31 as expected.
The 2nd C-n goes to column 29 on line 31 (expected column 30).
The 3rd C-n goes to column 28 on line 31 (expected 30 (or 29?)).
The 4th C-n goes to column 27 on line 31.

Not sure if this is the same on master.

On 4 July 2017 at 17:22, Filipe Silva <address@hidden> wrote:
> hehe thaks Eli. Are you sure you pushed your commit?
> On Jul 4, 2017 12:44 PM, "Eli Zaretskii" <address@hidden> wrote:
>> > From: Filipe Silva <address@hidden>
>> > Date: Tue, 4 Jul 2017 11:50:23 -0300
>> > Cc: James Nguyen <address@hidden>, Emacs developers
>> > <address@hidden>
>> >
>> > In my testing, I found that when point is on line 1, everything is fine.
>> > As you go down line by line, the
>> > line-number-current-face skips ahead by one so by the time point is on
>> > line 10, line-number-current-line face
>> > is really acting on a number 9 lines below what should be the current
>> > line.
>> Ha-ha, what a stupid bug!  Thanks, now fixed.

reply via email to

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