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


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Sat, 03 Sep 2005 21:28:41 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.1045 emacs/src/xdisp.c:1.1046
*** emacs/src/xdisp.c:1.1045    Fri Aug 26 15:56:48 2005
--- emacs/src/xdisp.c   Sun Sep  4 01:28:41 2005
***************
*** 6012,6017 ****
--- 6012,6019 ----
             glyphs have the same width.  */
          int single_glyph_width = it->pixel_width / it->nglyphs;
          int new_x;
+         int x_before_this_char = x;
+         int hpos_before_this_char = it->hpos;
  
          for (i = 0; i < it->nglyphs; ++i, x = new_x)
            {
***************
*** 6043,6050 ****
--- 6045,6066 ----
                    {
                      ++it->hpos;
                      it->current_x = new_x;
+ 
+                     /* The character's last glyph just barely fits
+                        in this row.  */
                      if (i == it->nglyphs - 1)
                        {
+                         /* If this is the destination position,
+                            return a position *before* it in this row,
+                            now that we know it fits in this row.  */
+                         if (BUFFER_POS_REACHED_P ())
+                           {
+                             it->hpos = hpos_before_this_char;
+                             it->current_x = x_before_this_char;
+                             result = MOVE_POS_MATCH_OR_ZV;
+                             break;
+                           }
+ 
                          set_iterator_to_next (it, 1);
  #ifdef HAVE_WINDOW_SYSTEM
                          if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
***************
*** 10596,10604 ****
    if (consider_all_windows_p)
      {
        Lisp_Object tail, frame;
!       int i, n = 0, size = 50;
!       struct frame **updated
!       = (struct frame **) alloca (size * sizeof *updated);
  
        /* Recompute # windows showing selected buffer.  This will be
         incremented each time such a window is displayed.  */
--- 10612,10624 ----
    if (consider_all_windows_p)
      {
        Lisp_Object tail, frame;
!       int i, n = 0, size = 5;
!       struct frame **updated;
! 
!       FOR_EACH_FRAME (tail, frame)
!       size++;
! 
!       updated = (struct frame **) alloca (size * sizeof *updated);
  
        /* Recompute # windows showing selected buffer.  This will be
         incremented each time such a window is displayed.  */




reply via email to

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