comparison src/xdisp.c @ 108450:de8a1b891175

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 11 Apr 2010 10:53:01 +0000
parents c7670de45d8a
children 93782019c88c
comparison
equal deleted inserted replaced
108449:0346e41d1e53 108450:de8a1b891175
14201 || MINI_WINDOW_P (w) 14201 || MINI_WINDOW_P (w)
14202 || !(used_current_matrix_p 14202 || !(used_current_matrix_p
14203 = try_window_reusing_current_matrix (w))) 14203 = try_window_reusing_current_matrix (w)))
14204 { 14204 {
14205 IF_DEBUG (debug_method_add (w, "1")); 14205 IF_DEBUG (debug_method_add (w, "1"));
14206 if (try_window (window, startp, 1) < 0) 14206 if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
14207 /* -1 means we need to scroll. 14207 /* -1 means we need to scroll.
14208 0 means we need new matrices, but fonts_changed_p 14208 0 means we need new matrices, but fonts_changed_p
14209 is set in that case, so we will detect it below. */ 14209 is set in that case, so we will detect it below. */
14210 goto try_to_scroll; 14210 goto try_to_scroll;
14211 } 14211 }
14552 buffer position POS. 14552 buffer position POS.
14553 14553
14554 Value is 1 if successful. It is zero if fonts were loaded during 14554 Value is 1 if successful. It is zero if fonts were loaded during
14555 redisplay which makes re-adjusting glyph matrices necessary, and -1 14555 redisplay which makes re-adjusting glyph matrices necessary, and -1
14556 if point would appear in the scroll margins. 14556 if point would appear in the scroll margins.
14557 (We check that only if CHECK_MARGINS is nonzero. */ 14557 (We check the former only if TRY_WINDOW_IGNORE_FONTS_CHANGE is
14558 unset in FLAGS, and the latter only if TRY_WINDOW_CHECK_MARGINS is
14559 set in FLAGS.) */
14558 14560
14559 int 14561 int
14560 try_window (window, pos, check_margins) 14562 try_window (window, pos, flags)
14561 Lisp_Object window; 14563 Lisp_Object window;
14562 struct text_pos pos; 14564 struct text_pos pos;
14563 int check_margins; 14565 int flags;
14564 { 14566 {
14565 struct window *w = XWINDOW (window); 14567 struct window *w = XWINDOW (window);
14566 struct it it; 14568 struct it it;
14567 struct glyph_row *last_text_row = NULL; 14569 struct glyph_row *last_text_row = NULL;
14568 struct frame *f = XFRAME (w->frame); 14570 struct frame *f = XFRAME (w->frame);
14580 /* Display all lines of W. */ 14582 /* Display all lines of W. */
14581 while (it.current_y < it.last_visible_y) 14583 while (it.current_y < it.last_visible_y)
14582 { 14584 {
14583 if (display_line (&it)) 14585 if (display_line (&it))
14584 last_text_row = it.glyph_row - 1; 14586 last_text_row = it.glyph_row - 1;
14585 if (fonts_changed_p) 14587 if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
14586 return 0; 14588 return 0;
14587 } 14589 }
14588 14590
14589 /* Don't let the cursor end in the scroll margins. */ 14591 /* Don't let the cursor end in the scroll margins. */
14590 if (check_margins 14592 if ((flags & TRY_WINDOW_CHECK_MARGINS)
14591 && !MINI_WINDOW_P (w)) 14593 && !MINI_WINDOW_P (w))
14592 { 14594 {
14593 int this_scroll_margin; 14595 int this_scroll_margin;
14594 14596
14595 if (scroll_margin > 0) 14597 if (scroll_margin > 0)