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: Sat, 04 Sep 2004 05:44:20 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.754.2.26 emacs/src/xdisp.c:1.754.2.27
*** emacs/src/xdisp.c:1.754.2.26        Fri Jul 23 04:42:23 2004
--- emacs/src/xdisp.c   Sat Sep  4 09:18:40 2004
***************
*** 5649,5657 ****
      {
        int x, i, ascent = 0, descent = 0;
  
!       /* Stop when ZV or TO_CHARPOS reached.  */
        if (!get_next_display_element (it)
!         || BUFFER_POS_REACHED_P ())
        {
          result = MOVE_POS_MATCH_OR_ZV;
          break;
--- 5649,5661 ----
      {
        int x, i, ascent = 0, descent = 0;
  
!       /* Stop when ZV reached.
!          We used to stop here when TO_CHARPOS reached as well, but that is
!          too soon if this glyph does not fit on this line.  So we handle it
!          explicitly below.  */
        if (!get_next_display_element (it)
!         || (it->truncate_lines_p
!             && BUFFER_POS_REACHED_P ()))
        {
          result = MOVE_POS_MATCH_OR_ZV;
          break;
***************
*** 5711,5716 ****
--- 5715,5722 ----
              /* We want to leave anything reaching TO_X to the caller.  */
              if ((op & MOVE_TO_X) && new_x > to_x)
                {
+                 if (BUFFER_POS_REACHED_P ())
+                   goto buffer_pos_reached;
                  it->current_x = x;
                  result = MOVE_X_REACHED;
                  break;
***************
*** 5738,5749 ****
  #ifdef HAVE_WINDOW_SYSTEM
                          if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
                            {
!                             if (!get_next_display_element (it)
!                                 || BUFFER_POS_REACHED_P ())
                                {
                                  result = MOVE_POS_MATCH_OR_ZV;
                                  break;
                                }
                              if (ITERATOR_AT_END_OF_LINE_P (it))
                                {
                                  result = MOVE_NEWLINE_OR_CR;
--- 5744,5762 ----
  #ifdef HAVE_WINDOW_SYSTEM
                          if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
                            {
!                             if (!get_next_display_element (it))
                                {
                                  result = MOVE_POS_MATCH_OR_ZV;
                                  break;
                                }
+                             if (BUFFER_POS_REACHED_P ())
+                               {
+                                 if (ITERATOR_AT_END_OF_LINE_P (it))
+                                   result = MOVE_POS_MATCH_OR_ZV;
+                                 else
+                                   result = MOVE_LINE_CONTINUED;
+                                 break;
+                               }
                              if (ITERATOR_AT_END_OF_LINE_P (it))
                                {
                                  result = MOVE_NEWLINE_OR_CR;
***************
*** 5765,5770 ****
--- 5778,5785 ----
                  result = MOVE_LINE_CONTINUED;
                  break;
                }
+             else if (BUFFER_POS_REACHED_P ())
+               goto buffer_pos_reached;
              else if (new_x > it->first_visible_x)
                {
                  /* Glyph is visible.  Increment number of glyphs that
***************
*** 5781,5786 ****
--- 5796,5810 ----
          if (result != MOVE_UNDEFINED)
            break;
        }
+       else if (BUFFER_POS_REACHED_P ())
+       {
+       buffer_pos_reached:
+         it->current_x = x;
+         it->max_ascent = ascent;
+         it->max_descent = descent;
+         result = MOVE_POS_MATCH_OR_ZV;
+         break;
+       }
        else if ((op & MOVE_TO_X) && it->current_x >= to_x)
        {
          /* Stop when TO_X specified and reached.  This check is




reply via email to

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