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

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

bug#44284: 27.1; with some Unicode font, scrolling upward with the mouse


From: Vincent Lefevre
Subject: bug#44284: 27.1; with some Unicode font, scrolling upward with the mouse wheel actually scrolls downward when the cursor needs repositioning
Date: Sat, 31 Oct 2020 02:13:50 +0100
User-agent: Mutt/1.14.5+76 (bb407ec3) vl-127292 (2020-06-24)

On 2020-10-31 01:46:17 +0100, Vincent Lefevre wrote:
> So I assume that the bug occurs somewhere in try_cursor_movement.

In try_cursor_movement, one has:

              if (MATRIX_ROW_BOTTOM_Y (row) > last_y
                  || PT > MATRIX_ROW_END_CHARPOS (row)
                  /* Line is completely visible last line in window
                     and PT is to be set in the next line.  */
                  || (MATRIX_ROW_BOTTOM_Y (row) == last_y
                      && PT == MATRIX_ROW_END_CHARPOS (row)
                      && !row->ends_at_zv_p
                      && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)))

With the culprit font, MATRIX_ROW_BOTTOM_Y (row) > last_y becomes 1
when the cursor reaches the last line. With a working font, the value
is still 0.

More precisely, with size 13, MATRIX_ROW_BOTTOM_Y (row) and last_y are:

27 442
40 442
53 442
...
417 442
430 442
443 442  <-- line 34 (last visible line)

and with size 14:

28 476
42 476
56 476
...
448 476
462 476
476 476  <-- line 34 (last visible line)

The issue with size 13 is that MATRIX_ROW_BOTTOM_Y (row) is 13*n+1
instead of 13*n.

That's all for today.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





reply via email to

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