aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2001-10-20 05:42:06 +0000
committerMiles Bader2001-10-20 05:42:06 +0000
commit4cecaab8424039a056166c68fd89031756cd0357 (patch)
tree6e784144b39721d304ddd6d89fc795cf5be5e1fa /src
parent236f384702739a740c235185930a7eb678192fb2 (diff)
downloademacs-4cecaab8424039a056166c68fd89031756cd0357.tar.gz
emacs-4cecaab8424039a056166c68fd89031756cd0357.zip
(update_frame_line): Don't call reassert_line_highlight.
(line_hash_code, row_equal_p, fake_current_matrices) (build_frame_matrix_from_leaf_window, update_frame_line) (update_frame_line, update_frame_line, update_frame_line): Don't use `inverse_p' field.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c97
1 files changed, 24 insertions, 73 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index d75aa837c87..033847dd942 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1385,31 +1385,22 @@ line_hash_code (row)
1385 1385
1386 if (row->enabled_p) 1386 if (row->enabled_p)
1387 { 1387 {
1388 if (row->inverse_p) 1388 struct glyph *glyph = row->glyphs[TEXT_AREA];
1389 { 1389 struct glyph *end = glyph + row->used[TEXT_AREA];
1390 /* Give all highlighted lines the same hash code 1390
1391 so as to encourage scrolling to leave them in place. */ 1391 while (glyph < end)
1392 hash = -1; 1392 {
1393 } 1393 int c = glyph->u.ch;
1394 else 1394 int face_id = glyph->face_id;
1395 { 1395 if (must_write_spaces)
1396 struct glyph *glyph = row->glyphs[TEXT_AREA]; 1396 c -= SPACEGLYPH;
1397 struct glyph *end = glyph + row->used[TEXT_AREA]; 1397 hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + c;
1398 1398 hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + face_id;
1399 while (glyph < end) 1399 ++glyph;
1400 { 1400 }
1401 int c = glyph->u.ch;
1402 int face_id = glyph->face_id;
1403 if (must_write_spaces)
1404 c -= SPACEGLYPH;
1405 hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + c;
1406 hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + face_id;
1407 ++glyph;
1408 }
1409 1401
1410 if (hash == 0) 1402 if (hash == 0)
1411 hash = 1; 1403 hash = 1;
1412 }
1413 } 1404 }
1414 1405
1415 return hash; 1406 return hash;
@@ -1518,7 +1509,6 @@ row_equal_p (w, a, b, mouse_face_p)
1518 } 1509 }
1519 1510
1520 if (a->truncated_on_left_p != b->truncated_on_left_p 1511 if (a->truncated_on_left_p != b->truncated_on_left_p
1521 || a->inverse_p != b->inverse_p
1522 || a->fill_line_p != b->fill_line_p 1512 || a->fill_line_p != b->fill_line_p
1523 || a->truncated_on_right_p != b->truncated_on_right_p 1513 || a->truncated_on_right_p != b->truncated_on_right_p
1524 || a->overlay_arrow_p != b->overlay_arrow_p 1514 || a->overlay_arrow_p != b->overlay_arrow_p
@@ -2190,7 +2180,6 @@ fake_current_matrices (window)
2190 - r->used[LEFT_MARGIN_AREA] 2180 - r->used[LEFT_MARGIN_AREA]
2191 - r->used[RIGHT_MARGIN_AREA]); 2181 - r->used[RIGHT_MARGIN_AREA]);
2192 r->mode_line_p = 0; 2182 r->mode_line_p = 0;
2193 r->inverse_p = fr->inverse_p;
2194 } 2183 }
2195 } 2184 }
2196 } 2185 }
@@ -2798,9 +2787,6 @@ build_frame_matrix_from_leaf_window (frame_matrix, w)
2798 frame_row->used[TEXT_AREA] 2787 frame_row->used[TEXT_AREA]
2799 = window_matrix->matrix_x + window_matrix->matrix_w; 2788 = window_matrix->matrix_x + window_matrix->matrix_w;
2800 2789
2801 /* Or in other flags. */
2802 frame_row->inverse_p |= window_row->inverse_p;
2803
2804 /* Next row. */ 2790 /* Next row. */
2805 ++window_y; 2791 ++window_y;
2806 ++frame_y; 2792 ++frame_y;
@@ -5399,16 +5385,6 @@ update_frame_line (f, vpos)
5399 if (colored_spaces_p) 5385 if (colored_spaces_p)
5400 write_spaces_p = 1; 5386 write_spaces_p = 1;
5401 5387
5402 if (desired_row->inverse_p
5403 != (current_row->enabled_p && current_row->inverse_p))
5404 {
5405 int n = current_row->enabled_p ? current_row->used[TEXT_AREA] : 0;
5406 change_line_highlight (desired_row->inverse_p, vpos, vpos, n);
5407 current_row->enabled_p = 0;
5408 }
5409 else
5410 reassert_line_highlight (desired_row->inverse_p, vpos);
5411
5412 /* Current row not enabled means it has unknown contents. We must 5388 /* Current row not enabled means it has unknown contents. We must
5413 write the whole desired line in that case. */ 5389 write the whole desired line in that case. */
5414 must_write_whole_line_p = !current_row->enabled_p; 5390 must_write_whole_line_p = !current_row->enabled_p;
@@ -5422,26 +5398,14 @@ update_frame_line (f, vpos)
5422 obody = MATRIX_ROW_GLYPH_START (current_matrix, vpos); 5398 obody = MATRIX_ROW_GLYPH_START (current_matrix, vpos);
5423 olen = current_row->used[TEXT_AREA]; 5399 olen = current_row->used[TEXT_AREA];
5424 5400
5425 if (!current_row->inverse_p) 5401 /* Ignore trailing spaces, if we can. */
5426 { 5402 if (!write_spaces_p)
5427 /* Ignore trailing spaces, if we can. */ 5403 while (olen > 0 && CHAR_GLYPH_SPACE_P (obody[olen-1]))
5428 if (!write_spaces_p) 5404 olen--;
5429 while (olen > 0 && CHAR_GLYPH_SPACE_P (obody[olen-1]))
5430 olen--;
5431 }
5432 else
5433 {
5434 /* For an inverse-video line, make sure it's filled with
5435 spaces all the way to the frame edge so that the reverse
5436 video extends all the way across. */
5437 while (olen < FRAME_WIDTH (f) - 1)
5438 obody[olen++] = space_glyph;
5439 }
5440 } 5405 }
5441 5406
5442 current_row->enabled_p = 1; 5407 current_row->enabled_p = 1;
5443 current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA]; 5408 current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA];
5444 current_row->inverse_p = desired_row->inverse_p;
5445 5409
5446 /* If desired line is empty, just clear the line. */ 5410 /* If desired line is empty, just clear the line. */
5447 if (!desired_row->enabled_p) 5411 if (!desired_row->enabled_p)
@@ -5488,20 +5452,9 @@ update_frame_line (f, vpos)
5488 5452
5489 /* Pretend trailing spaces are not there at all, 5453 /* Pretend trailing spaces are not there at all,
5490 unless for one reason or another we must write all spaces. */ 5454 unless for one reason or another we must write all spaces. */
5491 if (!desired_row->inverse_p) 5455 if (!write_spaces_p)
5492 { 5456 while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
5493 if (!write_spaces_p) 5457 nlen--;
5494 while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
5495 nlen--;
5496 }
5497 else
5498 {
5499 /* For an inverse-video line, give it extra trailing spaces all
5500 the way to the frame edge so that the reverse video extends
5501 all the way across. */
5502 while (nlen < FRAME_WIDTH (f) - 1)
5503 nbody[nlen++] = space_glyph;
5504 }
5505 5458
5506 /* If there's no i/d char, quickly do the best we can without it. */ 5459 /* If there's no i/d char, quickly do the best we can without it. */
5507 if (!char_ins_del_ok) 5460 if (!char_ins_del_ok)
@@ -5550,7 +5503,7 @@ update_frame_line (f, vpos)
5550 { 5503 {
5551 /* If current line is blank, skip over initial spaces, if 5504 /* If current line is blank, skip over initial spaces, if
5552 possible, and write the rest. */ 5505 possible, and write the rest. */
5553 if (write_spaces_p || desired_row->inverse_p) 5506 if (write_spaces_p)
5554 nsp = 0; 5507 nsp = 0;
5555 else 5508 else
5556 nsp = count_blanks (nbody, nlen); 5509 nsp = count_blanks (nbody, nlen);
@@ -5568,9 +5521,7 @@ update_frame_line (f, vpos)
5568 5521
5569 /* Compute number of leading blanks in old and new contents. */ 5522 /* Compute number of leading blanks in old and new contents. */
5570 osp = count_blanks (obody, olen); 5523 osp = count_blanks (obody, olen);
5571 nsp = (desired_row->inverse_p || colored_spaces_p 5524 nsp = (colored_spaces_p ? 0 : count_blanks (nbody, nlen));
5572 ? 0
5573 : count_blanks (nbody, nlen));
5574 5525
5575 /* Compute number of matching chars starting with first non-blank. */ 5526 /* Compute number of matching chars starting with first non-blank. */
5576 begmatch = count_match (obody + osp, obody + olen, 5527 begmatch = count_match (obody + osp, obody + olen,