Mercurial > emacs
changeset 58051:b9f91c494722
(fast_find_position): Fix start pos if header line present.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 08 Nov 2004 22:12:13 +0000 |
parents | 5ae6aa640a47 |
children | 09005c2a520b |
files | src/xdisp.c |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Mon Nov 08 22:11:40 2004 +0000 +++ b/src/xdisp.c Mon Nov 08 22:12:13 2004 +0000 @@ -20411,19 +20411,20 @@ int past_end = 0; first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + if (charpos < MATRIX_ROW_START_CHARPOS (first)) + { + *x = first->x; + *y = first->y; + *hpos = 0; + *vpos = MATRIX_ROW_VPOS (first, w->current_matrix); + return 1; + } + row = row_containing_pos (w, charpos, first, NULL, 0); if (row == NULL) { - if (charpos < MATRIX_ROW_START_CHARPOS (first)) - { - *x = *y = *hpos = *vpos = 0; - return 1; - } - else - { - row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); - past_end = 1; - } + row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); + past_end = 1; } *x = row->x;