aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-11 19:57:54 +0000
committerGerd Moellmann2000-07-11 19:57:54 +0000
commite4e0bee93c3aa63184bd566641f6411248005843 (patch)
tree9d2a1572d0ea1be34f529d20151663e7e479a251 /src
parent48b509fe7063368127c0f6cc375bd4ce41ec8781 (diff)
downloademacs-e4e0bee93c3aa63184bd566641f6411248005843.tar.gz
emacs-e4e0bee93c3aa63184bd566641f6411248005843.zip
(direct_output_forward_char): Give up if currently
displaying a message instead of the minibuffer contents. (row_equal_p): Add parameter MOUSE_FACE_P. If set, compare the mouse_face_p flags of both rows.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 233507fd2cb..430be4e96ce 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -171,7 +171,7 @@ static int update_window P_ ((struct window *, int));
171static int update_frame_1 P_ ((struct frame *, int, int)); 171static int update_frame_1 P_ ((struct frame *, int, int));
172static void set_window_cursor_after_update P_ ((struct window *)); 172static void set_window_cursor_after_update P_ ((struct window *));
173static int row_equal_p P_ ((struct window *, struct glyph_row *, 173static int row_equal_p P_ ((struct window *, struct glyph_row *,
174 struct glyph_row *)); 174 struct glyph_row *, int));
175static void adjust_frame_glyphs_for_window_redisplay P_ ((struct frame *)); 175static void adjust_frame_glyphs_for_window_redisplay P_ ((struct frame *));
176static void adjust_frame_glyphs_for_frame_redisplay P_ ((struct frame *)); 176static void adjust_frame_glyphs_for_frame_redisplay P_ ((struct frame *));
177static void reverse_rows P_ ((struct glyph_matrix *, int, int)); 177static void reverse_rows P_ ((struct glyph_matrix *, int, int));
@@ -1348,12 +1348,14 @@ line_draw_cost (matrix, vpos)
1348/* Test two glyph rows A and B for equality. Value is non-zero if A 1348/* Test two glyph rows A and B for equality. Value is non-zero if A
1349 and B have equal contents. W is the window to which the glyphs 1349 and B have equal contents. W is the window to which the glyphs
1350 rows A and B belong. It is needed here to test for partial row 1350 rows A and B belong. It is needed here to test for partial row
1351 visibility. */ 1351 visibility. MOUSE_FACE_P non-zero means compare the mouse_face_p
1352 flags of A and B, too. */
1352 1353
1353static INLINE int 1354static INLINE int
1354row_equal_p (w, a, b) 1355row_equal_p (w, a, b, mouse_face_p)
1355 struct window *w; 1356 struct window *w;
1356 struct glyph_row *a, *b; 1357 struct glyph_row *a, *b;
1358 int mouse_face_p;
1357{ 1359{
1358 if (a == b) 1360 if (a == b)
1359 return 1; 1361 return 1;
@@ -1364,6 +1366,9 @@ row_equal_p (w, a, b)
1364 struct glyph *a_glyph, *b_glyph, *a_end; 1366 struct glyph *a_glyph, *b_glyph, *a_end;
1365 int area; 1367 int area;
1366 1368
1369 if (mouse_face_p && a->mouse_face_p != b->mouse_face_p)
1370 return 0;
1371
1367 /* Compare glyphs. */ 1372 /* Compare glyphs. */
1368 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) 1373 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
1369 { 1374 {
@@ -3417,6 +3422,12 @@ direct_output_forward_char (n)
3417 if (!NILP (echo_area_buffer[0]) || !NILP (echo_area_buffer[1])) 3422 if (!NILP (echo_area_buffer[0]) || !NILP (echo_area_buffer[1]))
3418 return 0; 3423 return 0;
3419 3424
3425 /* Give up if currently displaying a message instead of the
3426 minibuffer contents. */
3427 if (XWINDOW (minibuf_window) == w
3428 && EQ (minibuf_window, echo_area_window))
3429 return 0;
3430
3420 /* Give up if we don't know where the cursor is. */ 3431 /* Give up if we don't know where the cursor is. */
3421 if (w->cursor.vpos < 0) 3432 if (w->cursor.vpos < 0)
3422 return 0; 3433 return 0;
@@ -4323,7 +4334,7 @@ add_row_entry (w, row)
4323 int i = row->hash % row_table_size; 4334 int i = row->hash % row_table_size;
4324 4335
4325 entry = row_table[i]; 4336 entry = row_table[i];
4326 while (entry && !row_equal_p (w, entry->row, row)) 4337 while (entry && !row_equal_p (w, entry->row, row, 1))
4327 entry = entry->next; 4338 entry = entry->next;
4328 4339
4329 if (entry == NULL) 4340 if (entry == NULL)
@@ -4388,7 +4399,7 @@ scrolling_window (w, header_line_p)
4388 && MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (current_matrix, i)) <= yb 4399 && MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (current_matrix, i)) <= yb
4389 && row_equal_p (w, 4400 && row_equal_p (w,
4390 MATRIX_ROW (desired_matrix, i), 4401 MATRIX_ROW (desired_matrix, i),
4391 MATRIX_ROW (current_matrix, i))) 4402 MATRIX_ROW (current_matrix, i), 1))
4392 { 4403 {
4393 assign_row (MATRIX_ROW (current_matrix, i), 4404 assign_row (MATRIX_ROW (current_matrix, i),
4394 MATRIX_ROW (desired_matrix, i)); 4405 MATRIX_ROW (desired_matrix, i));
@@ -4435,7 +4446,7 @@ scrolling_window (w, header_line_p)
4435 == MATRIX_ROW (desired_matrix, j - 1)->y) 4446 == MATRIX_ROW (desired_matrix, j - 1)->y)
4436 && row_equal_p (w, 4447 && row_equal_p (w,
4437 MATRIX_ROW (desired_matrix, i - 1), 4448 MATRIX_ROW (desired_matrix, i - 1),
4438 MATRIX_ROW (current_matrix, j - 1))) 4449 MATRIX_ROW (current_matrix, j - 1), 1))
4439 --i, --j; 4450 --i, --j;
4440 last_new = i; 4451 last_new = i;
4441 last_old = j; 4452 last_old = j;