/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.843.2.28 by handa, Fri Oct 15 02:12:58 2004 UTC revision 1.843.2.29 by miles, Fri Oct 22 10:13:35 2004 UTC
# Line 8087  store_frame_title (str, field_width, pre Line 8087  store_frame_title (str, field_width, pre
8087    
8088    /* Copy at most PRECISION chars from STR.  */    /* Copy at most PRECISION chars from STR.  */
8089    nbytes = strlen (str);    nbytes = strlen (str);
8090    n+= c_string_width (str, nbytes, precision, &dummy, &nbytes);    n += c_string_width (str, nbytes, precision, &dummy, &nbytes);
8091    while (nbytes--)    while (nbytes--)
8092      store_frame_title_char (*str++);      store_frame_title_char (*str++);
8093    
# Line 9634  update_overlay_arrows (up_to_date) Line 9634  update_overlay_arrows (up_to_date)
9634  }  }
9635    
9636    
9637  /* Return overlay arrow string at row, or nil.  */  /* Return overlay arrow string to display at row.
9638       Return t if display as bitmap in left fringe.
9639       Return nil if no overlay arrow.  */
9640    
9641  static Lisp_Object  static Lisp_Object
9642  overlay_arrow_at_row (f, row, pbitmap)  overlay_arrow_at_row (it, row, pbitmap)
9643       struct frame *f;       struct it *it;
9644       struct glyph_row *row;       struct glyph_row *row;
9645       int *pbitmap;       int *pbitmap;
9646  {  {
# Line 9661  overlay_arrow_at_row (f, row, pbitmap) Line 9663  overlay_arrow_at_row (f, row, pbitmap)
9663            && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))            && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
9664          {          {
9665            val = overlay_arrow_string_or_property (var, pbitmap);            val = overlay_arrow_string_or_property (var, pbitmap);
9666            if (FRAME_WINDOW_P (f))            if (FRAME_WINDOW_P (it->f)
9667                  && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
9668              return Qt;              return Qt;
9669            else if (STRINGP (val))            if (STRINGP (val))
9670              return val;              return val;
9671            break;            break;
9672          }          }
# Line 12317  redisplay_window (window, just_this_one_ Line 12320  redisplay_window (window, just_this_one_
12320      }      }
12321    
12322  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
12323    if (update_window_fringes (w, 0)    if (FRAME_WINDOW_P (f)
12324          && update_window_fringes (w, 0)
12325        && !just_this_one_p        && !just_this_one_p
12326        && (used_current_matrix_p || overlay_arrow_seen)        && (used_current_matrix_p || overlay_arrow_seen)
12327        && !w->pseudo_window_p)        && !w->pseudo_window_p)
# Line 14172  usage: (trace-to-stderr STRING &rest OBJ Line 14176  usage: (trace-to-stderr STRING &rest OBJ
14176                       Building Desired Matrix Rows                       Building Desired Matrix Rows
14177   ***********************************************************************/   ***********************************************************************/
14178    
14179  /* Return a temporary glyph row holding the glyphs of an overlay  /* Return a temporary glyph row holding the glyphs of an overlay arrow.
14180     arrow.  Only used for non-window-redisplay windows.  */     Used for non-window-redisplay windows, and for windows w/o left fringe.  */
14181    
14182  static struct glyph_row *  static struct glyph_row *
14183  get_overlay_arrow_glyph_row (w, overlay_arrow_string)  get_overlay_arrow_glyph_row (w, overlay_arrow_string)
# Line 15054  display_line (it) Line 15058  display_line (it)
15058       better to let it be displayed like cursors under X.  */       better to let it be displayed like cursors under X.  */
15059    if (! overlay_arrow_seen    if (! overlay_arrow_seen
15060        && (overlay_arrow_string        && (overlay_arrow_string
15061              = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap),              = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap),
15062            !NILP (overlay_arrow_string)))            !NILP (overlay_arrow_string)))
15063      {      {
15064        /* Overlay arrow in window redisplay is a fringe bitmap.  */        /* Overlay arrow in window redisplay is a fringe bitmap.  */
15065        if (!FRAME_WINDOW_P (it->f))        if (STRINGP (overlay_arrow_string))
15066          {          {
15067            struct glyph_row *arrow_row            struct glyph_row *arrow_row
15068              = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string);              = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string);
# Line 15083  display_line (it) Line 15087  display_line (it)
15087                row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA];                row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA];
15088              }              }
15089          }          }
15090          else
15091            {
15092              it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
15093              row->overlay_arrow_p = 1;
15094            }
15095        overlay_arrow_seen = 1;        overlay_arrow_seen = 1;
       it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;  
       row->overlay_arrow_p = 1;  
15096      }      }
15097    
15098    /* Compute pixel dimensions of this line.  */    /* Compute pixel dimensions of this line.  */
# Line 15551  display_mode_element (it, depth, field_w Line 15557  display_mode_element (it, depth, field_w
15557    
15558              if (this - 1 != last)              if (this - 1 != last)
15559                {                {
15560                    int nchars, nbytes;
15561    
15562                  /* Output to end of string or up to '%'.  Field width                  /* Output to end of string or up to '%'.  Field width
15563                     is length of string.  Don't output more than                     is length of string.  Don't output more than
15564                     PRECISION allows us.  */                     PRECISION allows us.  */
15565                  --this;                  --this;
15566    
15567                  prec = chars_in_text (last, this - last);                  prec = c_string_width (last, this - last, precision - n,
15568                  if (precision > 0 && prec > precision - n)                                         &nchars, &nbytes);
                   prec = precision - n;  
15569    
15570                  if (frame_title_ptr)                  if (frame_title_ptr)
15571                    n += store_frame_title (last, 0, prec);                    n += store_frame_title (last, 0, prec);
# Line 15566  display_mode_element (it, depth, field_w Line 15573  display_mode_element (it, depth, field_w
15573                    {                    {
15574                      int bytepos = last - lisp_string;                      int bytepos = last - lisp_string;
15575                      int charpos = string_byte_to_char (elt, bytepos);                      int charpos = string_byte_to_char (elt, bytepos);
15576                        int endpos = (precision <= 0 ? SCHARS (elt)
15577                                      : charpos + nchars);
15578    
15579                      n += store_mode_line_string (NULL,                      n += store_mode_line_string (NULL,
15580                                                   Fsubstring (elt, make_number (charpos),                                                   Fsubstring (elt, make_number (charpos),
15581                                                               make_number (charpos + prec)),                                                               make_number (endpos)),
15582                                                   0, 0, 0, Qnil);                                                   0, 0, 0, Qnil);
15583                    }                    }
15584                  else                  else

Legend:
Removed from v.1.843.2.28  
changed lines
  Added in v.1.843.2.29

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26