X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fredisplay-output.c;h=df280d71085673ca850bd713f817e610a8604899;hb=4aa6e8eb91e514ddfac11bc89a946b247cdf99d1;hp=61f22dea6a7440940376bf844563cd62ee0621ea;hpb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;p=chise%2Fxemacs-chise.git diff --git a/src/redisplay-output.c b/src/redisplay-output.c index 61f22de..df280d7 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA. */ #include "glyphs.h" #include "redisplay.h" #include "faces.h" +#include "gutter.h" static int compare_runes (struct window *w, struct rune *crb, struct rune *drb); @@ -220,7 +221,7 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) else if (crb->type != drb->type) return 0; else if (crb->type == RUNE_CHAR && - (crb->object.chr.ch != drb->object.chr.ch)) + !CHARC_EQ (crb->object.cglyph, drb->object.cglyph)) return 0; else if (crb->type == RUNE_HLINE && (crb->object.hline.thickness != drb->object.hline.thickness || @@ -1263,7 +1264,12 @@ redisplay_output_subwindow (struct window *w, sdga.height = IMAGE_INSTANCE_HEIGHT (p); sdga.width = IMAGE_INSTANCE_WIDTH (p); - if (redisplay_display_boxes_in_window_p (w, db, &sdga) < 0) + if (redisplay_display_boxes_in_window_p (w, db, &sdga) == 0 + || + /* We only want to do full subwindow display for windows that + are completely in the gutter, otherwise we must clip to be + safe. */ + display_boxes_in_gutter_p (XFRAME (w->frame), db, &sdga) <= 0) { map_subwindow (image_instance, db->xpos, db->ypos, dga); } @@ -1307,7 +1313,7 @@ redisplay_output_layout (Lisp_Object domain, { Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object rest, window = DOMAIN_WINDOW (domain); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Charc_dynarr *buf = Dynarr_new (Charc); struct window *w = XWINDOW (window); struct device *d = DOMAIN_XDEVICE (domain); int layout_height, layout_width; @@ -1443,7 +1449,7 @@ redisplay_output_layout (Lisp_Object domain, struct display_line dl; /* this is fake */ Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (childii); - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex); find_charsets_in_bufbyte_string (charsets, @@ -1451,8 +1457,9 @@ redisplay_output_layout (Lisp_Object domain, XSTRING_LENGTH (string)); ensure_face_cachel_complete (cachel, window, charsets); - convert_bufbyte_string_into_emchar_dynarr - (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + convert_bufbyte_string_into_charc_dynarr + (XSTRING_DATA (string), XSTRING_LENGTH (string), + buf); redisplay_normalize_display_box (&cdb, &cdga); /* Offsets are now +ve again so be careful @@ -1822,9 +1829,9 @@ redisplay_normalize_display_box (struct display_box* dest, /***************************************************************************** redisplay_display_boxes_in_window_p - Determine whether the require display_glyph_area is completely inside - the window. 0 means the display_box is not in the window. 1 means the - display_box and the display_glyph_area are in the window. -1 means + Determine whether the required display_glyph_area is completely inside + the window. -1 means the display_box is not in the window. 1 means the + display_box and the display_glyph_area are in the window. 0 means the display_box is in the window but the display_glyph_area is not. ****************************************************************************/ static int @@ -1840,8 +1847,8 @@ redisplay_display_boxes_in_window_p (struct window* w, if (db->xpos < left || db->ypos < top || db->xpos + db->width > right || db->ypos + db->height > bottom) - /* We are not displaying in a window at all */ - return 0; + /* We are not displaying in a window at all */ + return -1; if (db->xpos + dga->xoffset >= left && @@ -1852,7 +1859,7 @@ redisplay_display_boxes_in_window_p (struct window* w, db->ypos + dga->yoffset + dga->height <= bottom) return 1; - return -1; + return 0; } /*****************************************************************************