Fix a typo in 'window_text_pixel_size'
This typo caused strange mis-behaviors in buffers with non-ASCII characters. * src/xdisp.c (window_text_pixel_size): Fix typo. (Bug#76519)
This commit is contained in:
parent
8a8c25eacc
commit
0c6b8643ae
1 changed files with 3 additions and 1 deletions
|
@ -11546,6 +11546,7 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object from, Lisp_Object to,
|
|||
it.bidi_p = false;
|
||||
|
||||
int start_x;
|
||||
ptrdiff_t start_bpos = BYTEPOS (startp);
|
||||
if (vertical_offset != 0)
|
||||
{
|
||||
int last_y;
|
||||
|
@ -11578,6 +11579,7 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object from, Lisp_Object to,
|
|||
it.current_y = (WINDOW_TAB_LINE_HEIGHT (w)
|
||||
+ WINDOW_HEADER_LINE_HEIGHT (w));
|
||||
start = clip_to_bounds (BEGV, IT_CHARPOS (it), ZV);
|
||||
start_bpos = CHAR_TO_BYTE (start);
|
||||
start_y = it.current_y;
|
||||
start_x = it.current_x;
|
||||
}
|
||||
|
@ -11639,7 +11641,7 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object from, Lisp_Object to,
|
|||
it.current_y = start_y;
|
||||
/* If FROM is on a newline, pretend that we start at the beginning
|
||||
of the next line, because the newline takes no place on display. */
|
||||
if (FETCH_BYTE (start) == '\n')
|
||||
if (FETCH_BYTE (start_bpos) == '\n')
|
||||
it.current_x = 0, it.wrap_prefix_width = 0;
|
||||
if (!NILP (x_limit))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue