emacs-devel
[Top][All Lists]
Advanced

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

Re: Clicks map to wrong line with line-spacing > nil.


From: Eli Zaretskii
Subject: Re: Clicks map to wrong line with line-spacing > nil.
Date: Sat, 01 Aug 2015 13:03:02 +0300

> From: Tassilo Horn <address@hidden>
> Cc: David Koppelman <address@hidden>,  address@hidden
> Date: Sat, 01 Aug 2015 09:40:44 +0200
> 
> I can reproduce with emacs -Q and eb0f65b4.  Here's a recipe:

Thanks.  I am still not sure what are we talking about.  I can almost
say "not reproducible here", but see below.

First, please try the latest master.

> 1. emacs -Q
> 2. C-h h to open the HELLO file
> 3. M-: (setq line-spacing 50)
>    Here, that's immediately visible.
>    (window-size nil t) => 96, (window-size) => 47 but actually
>    with this spacing there are only 11 lines visible, i.e., I see
>    the HELLO portion from line 1 to the second line of the South
>    Asia entry.

That's not a problem, since window-size reports the height in
canonical character units, disregarding the line-spacing.

> 4. When I click on some word in lines 1-3, point is set on that word.
>    In later lines, point ends up on the previous line.  For ex., I
>    click on the "examples" in "Non-ASCII examples:" and point is set
>    to the beginning of the empty line before.  Clicking on "South" in
>    "South Asia:" puts point on "Middle" in "Middle/Near East:".

Does point get set always on the _previous_ line?  Because the
original report said something different, AFAIU:

> try clicking on a line towards the bottom of the window. The
> cursor moves to a point well above the mouse pointer.
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To me, "well above" doesn't sound like the previous line, but several
lines above that.  That I certainly cannot see.

As to setting point to the previous line, are you sure you don't click
on the spacing reserved below the characters of the previous line?
Setting line-spacing to a large value adds that many pixels _below_
the characters, so if you click slightly above the character, you are
actually clicking on the previous line.

> Doing the same with line-spacing set to 10, the problem becomes worse.
> Again, clicking on the first 3 lines works correctly, then on the next
> 2-3 lines jumps to the line before, then clicking on the next few lines
> makes point jump to 2 lines before the click position, etc.  So it
> becomes worse for the lines displayed later in a window.

I don't see the 2-line jump at all.  I sometimes see a 1-line jump,
but I think that's because I click on the spacing below the previous
line.

Could it be that the problem depends on how many empty lines are
between the window start and the location of the click?  If so, this
might be one consequence of bug#21165, which I fixed a few minutes
ago.



reply via email to

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