aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index bd68622ba29..f16933b69b3 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -525,7 +525,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
525 int header_line_changed_p = 0; 525 int header_line_changed_p = 0;
526 int header_line_p = 0; 526 int header_line_p = 0;
527 int left = -1, right = -1; 527 int left = -1, right = -1;
528 int window_x, window_y, window_width, window_height; 528 int window_x, window_y, window_width = -1, window_height;
529 529
530 /* See if W had a top line that has disappeared now, or vice versa. */ 530 /* See if W had a top line that has disappeared now, or vice versa. */
531 if (w) 531 if (w)
@@ -679,12 +679,15 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
679 when this function runs. */ 679 when this function runs. */
680 if (w && matrix == w->current_matrix) 680 if (w && matrix == w->current_matrix)
681 { 681 {
682 if (window_width < 0)
683 window_width = window_box_width (w, -1);
684
682 /* Optimize the case that only the height has changed (C-x 2, 685 /* Optimize the case that only the height has changed (C-x 2,
683 upper window). Invalidate all rows that are no longer part 686 upper window). Invalidate all rows that are no longer part
684 of the window. */ 687 of the window. */
685 if (!marginal_areas_changed_p 688 if (!marginal_areas_changed_p
686 && matrix->window_top_y == XFASTINT (w->top) 689 && matrix->window_top_y == XFASTINT (w->top)
687 && matrix->window_width == window_width) 690 && matrix->window_width == window_box_width (w, -1))
688 { 691 {
689 i = 0; 692 i = 0;
690 while (matrix->rows[i].enabled_p 693 while (matrix->rows[i].enabled_p
@@ -1317,7 +1320,7 @@ line_draw_cost (matrix, vpos)
1317 if (!must_write_spaces) 1320 if (!must_write_spaces)
1318 { 1321 {
1319 /* Skip from the end over trailing spaces. */ 1322 /* Skip from the end over trailing spaces. */
1320 while (end != beg && CHAR_GLYPH_SPACE_P (*end)) 1323 while (end > beg && CHAR_GLYPH_SPACE_P (*(end - 1)))
1321 --end; 1324 --end;
1322 1325
1323 /* All blank line. */ 1326 /* All blank line. */
@@ -4641,7 +4644,7 @@ scrolling_window (w, header_line_p)
4641 case. */ 4644 case. */
4642 for (j = 0; j < nruns && runs[j]->height > run->height; ++j) 4645 for (j = 0; j < nruns && runs[j]->height > run->height; ++j)
4643 ; 4646 ;
4644 for (k = nruns; k >= j; --k) 4647 for (k = nruns; k > j; --k)
4645 runs[k] = runs[k - 1]; 4648 runs[k] = runs[k - 1];
4646 runs[j] = run; 4649 runs[j] = run;
4647 ++nruns; 4650 ++nruns;