comparison src/xdisp.c @ 26374:e3e89fd28459

Remove conditional computation on USE_TEXT_PROPERTIES. (resize_mini_window): Fix computation of needed mini-window height.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 07 Nov 1999 22:35:57 +0000
parents 12ddeb9a6efd
children 2360d692254c
comparison
equal deleted inserted replaced
26373:e05151bc6531 26374:e3e89fd28459
2974 are invisible. */ 2974 are invisible. */
2975 if (it->selective > 0 2975 if (it->selective > 0
2976 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), 2976 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
2977 it->selective)) 2977 it->selective))
2978 visible_p = 0; 2978 visible_p = 0;
2979 #ifdef USE_TEXT_PROPERTIES
2980 else 2979 else
2981 { 2980 {
2982 Lisp_Object prop; 2981 Lisp_Object prop;
2983 2982
2984 prop = Fget_char_property (IT_CHARPOS (*it), Qinvisible, it->window); 2983 prop = Fget_char_property (IT_CHARPOS (*it), Qinvisible, it->window);
2985 if (TEXT_PROP_MEANS_INVISIBLE (prop)) 2984 if (TEXT_PROP_MEANS_INVISIBLE (prop))
2986 visible_p = 0; 2985 visible_p = 0;
2987 } 2986 }
2988 #endif /* USE_TEXT_PROPERTIES */
2989 2987
2990 /* Back one more newline if the current one is invisible. */ 2988 /* Back one more newline if the current one is invisible. */
2991 if (!visible_p) 2989 if (!visible_p)
2992 back_to_previous_line_start (it); 2990 back_to_previous_line_start (it);
2993 } 2991 }
4402 static int 4400 static int
4403 invisible_text_between_p (it, start_charpos, end_charpos) 4401 invisible_text_between_p (it, start_charpos, end_charpos)
4404 struct it *it; 4402 struct it *it;
4405 int start_charpos, end_charpos; 4403 int start_charpos, end_charpos;
4406 { 4404 {
4407 #ifdef USE_TEXT_PROPERTIES
4408 Lisp_Object prop, limit; 4405 Lisp_Object prop, limit;
4409 int invisible_found_p; 4406 int invisible_found_p;
4410 4407
4411 xassert (it != NULL && start_charpos <= end_charpos); 4408 xassert (it != NULL && start_charpos <= end_charpos);
4412 4409
4422 make_number (end_charpos)); 4419 make_number (end_charpos));
4423 invisible_found_p = XFASTINT (limit) < end_charpos; 4420 invisible_found_p = XFASTINT (limit) < end_charpos;
4424 } 4421 }
4425 4422
4426 return invisible_found_p; 4423 return invisible_found_p;
4427
4428 #else /* not USE_TEXT_PROPERTIES */
4429 return 0;
4430 #endif /* not USE_TEXT_PROPERTIES */
4431 } 4424 }
4432 4425
4433 4426
4434 /* Move IT by a specified number DVPOS of screen lines down. DVPOS 4427 /* Move IT by a specified number DVPOS of screen lines down. DVPOS
4435 negative means move up. DVPOS == 0 means move to the start of the 4428 negative means move up. DVPOS == 0 means move to the start of the
5516 /* Correct that max. height if it's bogus. */ 5509 /* Correct that max. height if it's bogus. */
5517 max_height = max (1, max_height); 5510 max_height = max (1, max_height);
5518 max_height = min (total_height, max_height); 5511 max_height = min (total_height, max_height);
5519 5512
5520 /* Find out the height of the text in the window. */ 5513 /* Find out the height of the text in the window. */
5514 last_height = 0;
5521 move_it_to (&it, ZV, -1, -1, -1, MOVE_TO_POS); 5515 move_it_to (&it, ZV, -1, -1, -1, MOVE_TO_POS);
5522 height = ((unit - 1 + it.current_y + it.max_ascent + it.max_descent) 5516 if (it.max_ascent == 0 && it.max_descent == 0)
5523 / unit); 5517 height = it.current_y + last_height;
5524 height = max (1, height); 5518 else
5519 height = it.current_y + it.max_ascent + it.max_descent;
5520 height = (height + unit - 1) / unit;
5525 5521
5526 /* Compute a suitable window start. */ 5522 /* Compute a suitable window start. */
5527 if (height > max_height) 5523 if (height > max_height)
5528 { 5524 {
5529 height = max_height; 5525 height = max_height;