emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c [emacs-unicode-2]
Date: Fri, 22 Oct 2004 06:21:41 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.843.2.28 emacs/src/xdisp.c:1.843.2.29
*** emacs/src/xdisp.c:1.843.2.28        Fri Oct 15 02:12:58 2004
--- emacs/src/xdisp.c   Fri Oct 22 10:13:35 2004
***************
*** 8087,8093 ****
  
    /* Copy at most PRECISION chars from STR.  */
    nbytes = strlen (str);
!   n+= c_string_width (str, nbytes, precision, &dummy, &nbytes);
    while (nbytes--)
      store_frame_title_char (*str++);
  
--- 8087,8093 ----
  
    /* Copy at most PRECISION chars from STR.  */
    nbytes = strlen (str);
!   n += c_string_width (str, nbytes, precision, &dummy, &nbytes);
    while (nbytes--)
      store_frame_title_char (*str++);
  
***************
*** 9634,9644 ****
  }
  
  
! /* Return overlay arrow string at row, or nil.  */
  
  static Lisp_Object
! overlay_arrow_at_row (f, row, pbitmap)
!      struct frame *f;
       struct glyph_row *row;
       int *pbitmap;
  {
--- 9634,9646 ----
  }
  
  
! /* 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 (it, row, pbitmap)
!      struct it *it;
       struct glyph_row *row;
       int *pbitmap;
  {
***************
*** 9661,9669 ****
          && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
        {
          val = overlay_arrow_string_or_property (var, pbitmap);
!         if (FRAME_WINDOW_P (f))
            return Qt;
!         else if (STRINGP (val))
            return val;
          break;
        }
--- 9663,9672 ----
          && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
        {
          val = overlay_arrow_string_or_property (var, pbitmap);
!         if (FRAME_WINDOW_P (it->f)
!             && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
            return Qt;
!         if (STRINGP (val))
            return val;
          break;
        }
***************
*** 12317,12323 ****
      }
  
  #ifdef HAVE_WINDOW_SYSTEM
!   if (update_window_fringes (w, 0)
        && !just_this_one_p
        && (used_current_matrix_p || overlay_arrow_seen)
        && !w->pseudo_window_p)
--- 12320,12327 ----
      }
  
  #ifdef HAVE_WINDOW_SYSTEM
!   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,14179 ****
                     Building Desired Matrix Rows
   ***********************************************************************/
  
! /* Return a temporary glyph row holding the glyphs of an overlay
!    arrow.  Only used for non-window-redisplay windows.  */
  
  static struct glyph_row *
  get_overlay_arrow_glyph_row (w, overlay_arrow_string)
--- 14176,14183 ----
                     Building Desired Matrix Rows
   ***********************************************************************/
  
! /* 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,15064 ****
       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),
          !NILP (overlay_arrow_string)))
      {
        /* Overlay arrow in window redisplay is a fringe bitmap.  */
!       if (!FRAME_WINDOW_P (it->f))
        {
          struct glyph_row *arrow_row
            = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string);
--- 15058,15068 ----
       better to let it be displayed like cursors under X.  */
    if (! overlay_arrow_seen
        && (overlay_arrow_string
!           = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap),
          !NILP (overlay_arrow_string)))
      {
        /* Overlay arrow in window redisplay is a fringe bitmap.  */
!       if (STRINGP (overlay_arrow_string))
        {
          struct glyph_row *arrow_row
            = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string);
***************
*** 15083,15092 ****
              row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA];
            }
        }
! 
        overlay_arrow_seen = 1;
-       it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
-       row->overlay_arrow_p = 1;
      }
  
    /* Compute pixel dimensions of this line.  */
--- 15087,15098 ----
              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;
      }
  
    /* Compute pixel dimensions of this line.  */
***************
*** 15551,15564 ****
  
            if (this - 1 != last)
              {
                /* 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;
  
                if (frame_title_ptr)
                  n += store_frame_title (last, 0, prec);
--- 15557,15571 ----
  
            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 = c_string_width (last, this - last, precision - n,
!                                      &nchars, &nbytes);
  
                if (frame_title_ptr)
                  n += store_frame_title (last, 0, prec);
***************
*** 15566,15574 ****
                  {
                    int bytepos = last - lisp_string;
                    int charpos = string_byte_to_char (elt, bytepos);
                    n += store_mode_line_string (NULL,
                                                 Fsubstring (elt, make_number 
(charpos),
!                                                            make_number 
(charpos + prec)),
                                                 0, 0, 0, Qnil);
                  }
                else
--- 15573,15584 ----
                  {
                    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 
(endpos)),
                                                 0, 0, 0, Qnil);
                  }
                else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]