comparison src/redisplay.c @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 0e522484dd2a
children 83b3d10dcba9
comparison
equal deleted inserted replaced
242:fc816b73a05f 243:f220cc83d72e
932 932
933 crb->findex = data->findex; 933 crb->findex = data->findex;
934 crb->xpos = data->pixpos; 934 crb->xpos = data->pixpos;
935 crb->width = width; 935 crb->width = width;
936 if (data->bi_bufpos) 936 if (data->bi_bufpos)
937 { 937 crb->bufpos =
938 struct buffer *buf = XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))); 938 bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))),
939 crb->bufpos = bytind_to_bufpos (buf, data->bi_bufpos); 939 data->bi_bufpos);
940 }
941 else if (data->is_modeline) 940 else if (data->is_modeline)
942 crb->bufpos = data->modeline_charpos; 941 crb->bufpos = data->modeline_charpos;
943 else 942 else
944 /* fuckme if this shouldn't be an abort. */ 943 /* fuckme if this shouldn't be an abort. */
945 /* abort (); fuckme harder, this abort gets tripped quite often, 944 /* abort (); fuckme harder, this abort gets tripped quite often,
1077 1076
1078 rb.findex = data->findex; 1077 rb.findex = data->findex;
1079 rb.xpos = data->pixpos; 1078 rb.xpos = data->pixpos;
1080 rb.width = data->blank_width; 1079 rb.width = data->blank_width;
1081 if (data->bi_bufpos) 1080 if (data->bi_bufpos)
1082 { 1081 rb.bufpos =
1083 struct buffer *buf = XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))); 1082 bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))),
1084 rb.bufpos = bytind_to_bufpos (buf, data->bi_bufpos); 1083 data->bi_bufpos);
1085 }
1086 else 1084 else
1087 /* #### and this is really correct too? */ 1085 /* #### and this is really correct too? */
1088 rb.bufpos = 0; 1086 rb.bufpos = 0;
1089 rb.endpos = 0; 1087 rb.endpos = 0;
1090 rb.type = RUNE_BLANK; 1088 rb.type = RUNE_BLANK;
1659 1657
1660 rb.xpos = data->pixpos; 1658 rb.xpos = data->pixpos;
1661 rb.width = width; 1659 rb.width = width;
1662 rb.bufpos = 0; /* glyphs are never "at" anywhere */ 1660 rb.bufpos = 0; /* glyphs are never "at" anywhere */
1663 if (data->bi_endpos) 1661 if (data->bi_endpos)
1664 { 1662 /* #### is this necessary at all? */
1665 /* #### is this necessary at all? */ 1663 rb.endpos = bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (w)),
1666 struct buffer *buf = XBUFFER (WINDOW_BUFFER (w)); 1664 data->bi_endpos);
1667 rb.endpos = bytind_to_bufpos (buf, data->bi_endpos);
1668 }
1669 else 1665 else
1670 rb.endpos = 0; 1666 rb.endpos = 0;
1671 rb.type = RUNE_DGLYPH; 1667 rb.type = RUNE_DGLYPH;
1672 /* #### Ben sez: this is way bogus if the glyph is a string. 1668 /* #### Ben sez: this is way bogus if the glyph is a string.
1673 You should not make the output routines have to cope with 1669 You should not make the output routines have to cope with
1680 rb.object.dglyph.extent = gb->extent; 1676 rb.object.dglyph.extent = gb->extent;
1681 rb.object.dglyph.xoffset = xoffset; 1677 rb.object.dglyph.xoffset = xoffset;
1682 1678
1683 if (allow_cursor) 1679 if (allow_cursor)
1684 { 1680 {
1685 { 1681 rb.bufpos = bytind_to_bufpos (XBUFFER (WINDOW_BUFFER (w)),
1686 struct buffer *buf = XBUFFER (WINDOW_BUFFER (w)); 1682 data->bi_bufpos);
1687 rb.bufpos = bytind_to_bufpos (buf, data->bi_bufpos);
1688 }
1689 1683
1690 if (data->cursor_type == CURSOR_ON) 1684 if (data->cursor_type == CURSOR_ON)
1691 { 1685 {
1692 if (data->bi_bufpos == data->bi_cursor_bufpos) 1686 if (data->bi_bufpos == data->bi_cursor_bufpos)
1693 { 1687 {
4805 /* Oh, well. */ 4799 /* Oh, well. */
4806 return 0; 4800 return 0;
4807 } 4801 }
4808 4802
4809 /* Given a window and a point, update the given display lines such 4803 /* Given a window and a point, update the given display lines such
4810 that point is displayed in the middle of the window. 4804 that point is displayed in the middle of the window.
4811 Return the window's new start position. */ 4805 Return the window's new start position. */
4812 4806
4813 static Bufpos 4807 static Bufpos
4814 regenerate_window_point_center (struct window *w, Bufpos point, int type) 4808 regenerate_window_point_center (struct window *w, Bufpos point, int type)
4815 { 4809 {