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 [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c [lexbind]
Date: Mon, 25 Oct 2004 00:41:53 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.754.2.34 emacs/src/xdisp.c:1.754.2.35
*** emacs/src/xdisp.c:1.754.2.34        Mon Oct 25 04:19:35 2004
--- emacs/src/xdisp.c   Mon Oct 25 04:22:26 2004
***************
*** 7976,7982 ****
  
    /* 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++);
  
--- 7976,7982 ----
  
    /* 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++);
  
***************
*** 9523,9533 ****
  }
  
  
! /* 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;
  {
--- 9523,9535 ----
  }
  
  
! /* 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;
  {
***************
*** 9550,9558 ****
          && (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;
        }
--- 9552,9561 ----
          && (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;
        }
***************
*** 12217,12223 ****
      }
  
  #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)
--- 12220,12227 ----
      }
  
  #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)
***************
*** 14072,14079 ****
                     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)
--- 14076,14083 ----
                     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)
***************
*** 14954,14964 ****
       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);
--- 14958,14968 ----
       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);
***************
*** 14983,14992 ****
              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.  */
--- 14987,14998 ----
              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.  */
***************
*** 15451,15464 ****
  
            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);
--- 15457,15471 ----
  
            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);
***************
*** 15466,15474 ****
                  {
                    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
--- 15473,15484 ----
                  {
                    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]