Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 1708:a19b0eb5dfc1
[xemacs-hg @ 2003-09-22 04:21:42 by james]
Add new pos-visible-in-window-p parameter for Emacs compatibility.
author | james |
---|---|
date | Mon, 22 Sep 2003 04:21:43 +0000 |
parents | 4f58e6e65139 |
children | a8d8f419b459 |
comparison
equal
deleted
inserted
replaced
1707:fca75a427ae3 | 1708:a19b0eb5dfc1 |
---|---|
8081 } | 8081 } |
8082 } | 8082 } |
8083 } | 8083 } |
8084 | 8084 |
8085 /* Return a boolean indicating if POINT would be visible in window W | 8085 /* Return a boolean indicating if POINT would be visible in window W |
8086 if display of the window was to begin at STARTP. */ | 8086 if display of the window was to begin at STARTP. If PARTIALLY is |
8087 | 8087 zero, then if POINT has fewer visible pixels than the window clip, |
8088 0 is returned; otherwise, 1 is returned if POINT has any visible | |
8089 pixels. */ | |
8088 int | 8090 int |
8089 point_would_be_visible (struct window *w, Charbpos startp, Charbpos point) | 8091 point_would_be_visible (struct window *w, Charbpos startp, Charbpos point, |
8092 int partially) | |
8090 { | 8093 { |
8091 struct buffer *b = XBUFFER (w->buffer); | 8094 struct buffer *b = XBUFFER (w->buffer); |
8092 int pixpos = -WINDOW_TEXT_TOP_CLIP(w); | 8095 int pixpos = -WINDOW_TEXT_TOP_CLIP(w); |
8093 int bottom = WINDOW_TEXT_HEIGHT (w); | 8096 int bottom = WINDOW_TEXT_HEIGHT (w); |
8094 int start_elt; | 8097 int start_elt; |
8143 | 8146 |
8144 height = Dynarr_atp (w->line_start_cache, start_elt)->height; | 8147 height = Dynarr_atp (w->line_start_cache, start_elt)->height; |
8145 | 8148 |
8146 if (pixpos + height > bottom) | 8149 if (pixpos + height > bottom) |
8147 { | 8150 { |
8148 if (bottom - pixpos < VERTICAL_CLIP (w, 0)) | 8151 if (bottom - pixpos < (partially ? 0 : VERTICAL_CLIP (w, 0))) |
8149 { | 8152 { |
8150 w->line_cache_validation_override--; | 8153 w->line_cache_validation_override--; |
8151 return 0; | 8154 return 0; |
8152 } | 8155 } |
8153 } | 8156 } |