diff options
| author | Kim F. Storm | 2004-11-08 22:12:13 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-08 22:12:13 +0000 |
| commit | a78bc3c08a389b62d24b95a2d93b69905b2ff824 (patch) | |
| tree | 45ec015ceb27111a85098183b5c097ea821ef958 /src | |
| parent | bae9677d9551a6aa87028478556b23a90949830b (diff) | |
| download | emacs-a78bc3c08a389b62d24b95a2d93b69905b2ff824.tar.gz emacs-a78bc3c08a389b62d24b95a2d93b69905b2ff824.zip | |
(fast_find_position): Fix start pos if header line present.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 2ed455e7f6b..b934e706c59 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20411,19 +20411,20 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) | |||
| 20411 | int past_end = 0; | 20411 | int past_end = 0; |
| 20412 | 20412 | ||
| 20413 | first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 20413 | first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 20414 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) | ||
| 20415 | { | ||
| 20416 | *x = first->x; | ||
| 20417 | *y = first->y; | ||
| 20418 | *hpos = 0; | ||
| 20419 | *vpos = MATRIX_ROW_VPOS (first, w->current_matrix); | ||
| 20420 | return 1; | ||
| 20421 | } | ||
| 20422 | |||
| 20414 | row = row_containing_pos (w, charpos, first, NULL, 0); | 20423 | row = row_containing_pos (w, charpos, first, NULL, 0); |
| 20415 | if (row == NULL) | 20424 | if (row == NULL) |
| 20416 | { | 20425 | { |
| 20417 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) | 20426 | row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); |
| 20418 | { | 20427 | past_end = 1; |
| 20419 | *x = *y = *hpos = *vpos = 0; | ||
| 20420 | return 1; | ||
| 20421 | } | ||
| 20422 | else | ||
| 20423 | { | ||
| 20424 | row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); | ||
| 20425 | past_end = 1; | ||
| 20426 | } | ||
| 20427 | } | 20428 | } |
| 20428 | 20429 | ||
| 20429 | *x = row->x; | 20430 | *x = row->x; |