Mercurial > emacs
diff src/xdisp.c @ 90033:f3ec05478165
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-62
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-616
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-620
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-622
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-625
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-627
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-629
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-630
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-632
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-633
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-51
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-52
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-53
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-54
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-55
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-56
Update from CVS: Add lisp/legacy-gnus-agent.el
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-57
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-58
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 22 Oct 2004 10:13:52 +0000 |
parents | 46eb9a242d5d a928074615ea |
children | 3a5b83e18d41 |
line wrap: on
line diff
--- a/src/xdisp.c Tue Oct 19 11:11:47 2004 +0000 +++ b/src/xdisp.c Fri Oct 22 10:13:52 2004 +0000 @@ -8087,7 +8087,7 @@ /* Copy at most PRECISION chars from STR. */ nbytes = strlen (str); - n+= c_string_width (str, nbytes, precision, &dummy, &nbytes); + n += c_string_width (str, nbytes, precision, &dummy, &nbytes); while (nbytes--) store_frame_title_char (*str++); @@ -9634,11 +9634,13 @@ } -/* Return overlay arrow string at row, or nil. */ +/* Return overlay arrow string to display at row. + Return t if display as bitmap in left fringe. + Return nil if no overlay arrow. */ static Lisp_Object -overlay_arrow_at_row (f, row, pbitmap) - struct frame *f; +overlay_arrow_at_row (it, row, pbitmap) + struct it *it; struct glyph_row *row; int *pbitmap; { @@ -9661,9 +9663,10 @@ && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) { val = overlay_arrow_string_or_property (var, pbitmap); - if (FRAME_WINDOW_P (f)) + if (FRAME_WINDOW_P (it->f) + && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0) return Qt; - else if (STRINGP (val)) + if (STRINGP (val)) return val; break; } @@ -12317,7 +12320,8 @@ } #ifdef HAVE_WINDOW_SYSTEM - if (update_window_fringes (w, 0) + if (FRAME_WINDOW_P (f) + && update_window_fringes (w, 0) && !just_this_one_p && (used_current_matrix_p || overlay_arrow_seen) && !w->pseudo_window_p) @@ -14172,8 +14176,8 @@ Building Desired Matrix Rows ***********************************************************************/ -/* Return a temporary glyph row holding the glyphs of an overlay - arrow. Only used for non-window-redisplay windows. */ +/* Return a temporary glyph row holding the glyphs of an overlay arrow. + Used for non-window-redisplay windows, and for windows w/o left fringe. */ static struct glyph_row * get_overlay_arrow_glyph_row (w, overlay_arrow_string) @@ -15054,11 +15058,11 @@ better to let it be displayed like cursors under X. */ if (! overlay_arrow_seen && (overlay_arrow_string - = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap), + = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), !NILP (overlay_arrow_string))) { /* Overlay arrow in window redisplay is a fringe bitmap. */ - if (!FRAME_WINDOW_P (it->f)) + if (STRINGP (overlay_arrow_string)) { struct glyph_row *arrow_row = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string); @@ -15083,10 +15087,12 @@ row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA]; } } - + else + { + it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; + row->overlay_arrow_p = 1; + } overlay_arrow_seen = 1; - it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; - row->overlay_arrow_p = 1; } /* Compute pixel dimensions of this line. */ @@ -15551,14 +15557,15 @@ if (this - 1 != last) { + int nchars, nbytes; + /* Output to end of string or up to '%'. Field width is length of string. Don't output more than PRECISION allows us. */ --this; - prec = chars_in_text (last, this - last); - if (precision > 0 && prec > precision - n) - prec = precision - n; + prec = c_string_width (last, this - last, precision - n, + &nchars, &nbytes); if (frame_title_ptr) n += store_frame_title (last, 0, prec); @@ -15566,9 +15573,12 @@ { int bytepos = last - lisp_string; int charpos = string_byte_to_char (elt, bytepos); + int endpos = (precision <= 0 ? SCHARS (elt) + : charpos + nchars); + n += store_mode_line_string (NULL, Fsubstring (elt, make_number (charpos), - make_number (charpos + prec)), + make_number (endpos)), 0, 0, 0, Qnil); } else