diff options
| author | Gerd Moellmann | 2000-08-29 15:04:48 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-29 15:04:48 +0000 |
| commit | 2a8bd25f14282558501248a4e8a0d646b6d1973e (patch) | |
| tree | 200072f0732b0a682377e4c717c2fb9636948b2d | |
| parent | a39fb83d371f7a961f10bbb675e9acbed5f7044a (diff) | |
| download | emacs-2a8bd25f14282558501248a4e8a0d646b6d1973e.tar.gz emacs-2a8bd25f14282558501248a4e8a0d646b6d1973e.zip | |
(build_frame_matrix_from_leaf_window): If a row of a
desired window matrix hasn't been displayed, use the current row
instead. Make sure that only those frame rows are updated for
which there is a corresponding enabled desired row.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/dispnew.c | 29 |
2 files changed, 29 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c0a37f53a8f..57dd1e2fca9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-08-29 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * dispnew.c (build_frame_matrix_from_leaf_window): If a row of a | ||
| 4 | desired window matrix hasn't been displayed, use the current row | ||
| 5 | instead. Make sure that only those frame rows are updated for | ||
| 6 | which there exists a corresponding enabled desired row. | ||
| 7 | |||
| 1 | 2000-08-29 Miles Bader <miles@gnu.org> | 8 | 2000-08-29 Miles Bader <miles@gnu.org> |
| 2 | 9 | ||
| 3 | * xfaces.c (default_face_vector): New function. | 10 | * xfaces.c (default_face_vector): New function. |
diff --git a/src/dispnew.c b/src/dispnew.c index 5cff07c04b9..e16296c717e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -2454,6 +2454,7 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) | |||
| 2454 | { | 2454 | { |
| 2455 | struct glyph_row *frame_row = frame_matrix->rows + frame_y; | 2455 | struct glyph_row *frame_row = frame_matrix->rows + frame_y; |
| 2456 | struct glyph_row *window_row = window_matrix->rows + window_y; | 2456 | struct glyph_row *window_row = window_matrix->rows + window_y; |
| 2457 | int current_row_p = window_matrix == w->current_matrix; | ||
| 2457 | 2458 | ||
| 2458 | /* Fill up the frame row with spaces up to the left margin of the | 2459 | /* Fill up the frame row with spaces up to the left margin of the |
| 2459 | window row. */ | 2460 | window row. */ |
| @@ -2461,19 +2462,32 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) | |||
| 2461 | 2462 | ||
| 2462 | /* Fill up areas in the window matrix row with spaces. */ | 2463 | /* Fill up areas in the window matrix row with spaces. */ |
| 2463 | fill_up_glyph_row_with_spaces (window_row); | 2464 | fill_up_glyph_row_with_spaces (window_row); |
| 2465 | |||
| 2466 | /* If only part of W's desired matrix has been built, and | ||
| 2467 | window_row wasn't displayed, use the corresponding current | ||
| 2468 | row instead. */ | ||
| 2469 | if (window_matrix == w->desired_matrix | ||
| 2470 | && !window_row->enabled_p) | ||
| 2471 | { | ||
| 2472 | window_row = w->current_matrix->rows + window_y; | ||
| 2473 | current_row_p = 1; | ||
| 2474 | } | ||
| 2464 | 2475 | ||
| 2465 | if (window_matrix == w->current_matrix) | 2476 | if (current_row_p) |
| 2466 | { | 2477 | { |
| 2467 | /* We have to copy W's current matrix. Copy window | 2478 | /* Copy window row to frame row. */ |
| 2468 | row to frame row. */ | ||
| 2469 | bcopy (window_row->glyphs[0], | 2479 | bcopy (window_row->glyphs[0], |
| 2470 | frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x, | 2480 | frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x, |
| 2471 | window_matrix->matrix_w * sizeof (struct glyph)); | 2481 | window_matrix->matrix_w * sizeof (struct glyph)); |
| 2472 | } | 2482 | } |
| 2473 | else | 2483 | else |
| 2474 | { | 2484 | { |
| 2475 | /* Copy W's desired matrix. */ | 2485 | xassert (window_row->enabled_p); |
| 2476 | 2486 | ||
| 2487 | /* Only when a desired row has been displayed, we want | ||
| 2488 | the corresponding frame row to be updated. */ | ||
| 2489 | frame_row->enabled_p = 1; | ||
| 2490 | |||
| 2477 | /* Maybe insert a vertical border between horizontally adjacent | 2491 | /* Maybe insert a vertical border between horizontally adjacent |
| 2478 | windows. */ | 2492 | windows. */ |
| 2479 | if (right_border_glyph) | 2493 | if (right_border_glyph) |
| @@ -2523,8 +2537,7 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) | |||
| 2523 | frame_row->used[TEXT_AREA] | 2537 | frame_row->used[TEXT_AREA] |
| 2524 | = window_matrix->matrix_x + window_matrix->matrix_w; | 2538 | = window_matrix->matrix_x + window_matrix->matrix_w; |
| 2525 | 2539 | ||
| 2526 | /* Or in flags. */ | 2540 | /* Or in other flags. */ |
| 2527 | frame_row->enabled_p |= window_row->enabled_p; | ||
| 2528 | frame_row->inverse_p |= window_row->inverse_p; | 2541 | frame_row->inverse_p |= window_row->inverse_p; |
| 2529 | 2542 | ||
| 2530 | /* Next row. */ | 2543 | /* Next row. */ |
| @@ -3443,11 +3456,13 @@ direct_output_forward_char (n) | |||
| 3443 | 3456 | ||
| 3444 | row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); | 3457 | row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); |
| 3445 | 3458 | ||
| 3459 | /* Give up if PT is outside of the last known cursor row. */ | ||
| 3446 | if (PT <= MATRIX_ROW_START_BYTEPOS (row) | 3460 | if (PT <= MATRIX_ROW_START_BYTEPOS (row) |
| 3447 | || PT >= MATRIX_ROW_END_BYTEPOS (row)) | 3461 | || PT >= MATRIX_ROW_END_BYTEPOS (row)) |
| 3448 | return 0; | 3462 | return 0; |
| 3449 | 3463 | ||
| 3450 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 3464 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 3465 | |||
| 3451 | w->last_cursor = w->cursor; | 3466 | w->last_cursor = w->cursor; |
| 3452 | XSETFASTINT (w->last_point, PT); | 3467 | XSETFASTINT (w->last_point, PT); |
| 3453 | 3468 | ||