mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 23:10:47 -08:00
Fix bug #4426 with buffer_posn_from_coords when header line is present.
dispnew.c (buffer_posn_from_coords): Account it.vpos for a possible presence of header-line.
This commit is contained in:
parent
8c069cc768
commit
352ec8ffdd
2 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2011-10-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* dispnew.c (buffer_posn_from_coords): Account for a possible
|
||||
presence of header-line. (Bug#4426)
|
||||
|
||||
2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't
|
||||
|
|
|
|||
|
|
@ -5261,6 +5261,10 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
|
|||
CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
|
||||
BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
|
||||
start_display (&it, w, startp);
|
||||
/* start_display takes into account the header-line row, but IT's
|
||||
vpos still counts from the glyph row that includes the window's
|
||||
start position. Adjust for a possible header-line row. */
|
||||
it.vpos += WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
|
||||
|
||||
x0 = *x;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue