]> git.eshelyaron.com Git - emacs.git/commitdiff
(start_display): Check more intelligently for
authorRichard M. Stallman <rms@gnu.org>
Fri, 29 Nov 2002 16:20:20 +0000 (16:20 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 29 Nov 2002 16:20:20 +0000 (16:20 +0000)
whether the line is continued.
(move_it_vertically_backward): Clear it->continuation_lines_width.

src/ChangeLog
src/xdisp.c

index b12eca0377097a7d775fdf9727cd9e06d989433c..4cc611c5854483a10cbd0e47b55e90d43069b79f 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-29  Richard M. Stallman  <rms@gnu.org>
+
+       * xdisp.c (start_display): Check more intelligently for
+       whether the line is continued.
+       (move_it_vertically_backward): Clear it->continuation_lines_width.
+
 2002-11-28  Dave Love  <fx@gnu.org>
 
        * s/amdahl.h, s/unipl5-0.h, m/sgi3000.h, s/3700.h, s/alliant-2800.h:
index 36d26f5cef8bba36fba7860da54add41cc70d2ef..38df34d7c5399a99df1b957b6255cfe9c59e12a3 100644 (file)
@@ -1791,16 +1791,27 @@ start_display (it, w, pos)
                             || FETCH_BYTE (BYTEPOS (pos) - 1) == '\n');
       if (!start_at_line_beg_p)
        {
+         int new_x;
+
          reseat_at_previous_visible_line_start (it);
          move_it_to (it, CHARPOS (pos), -1, -1, -1, MOVE_TO_POS);
 
+         new_x = it->current_x + it->pixel_width;
+
          /* If lines are continued, this line may end in the middle
             of a multi-glyph character (e.g. a control character
             displayed as \003, or in the middle of an overlay
             string).  In this case move_it_to above will not have
             taken us to the start of the continuation line but to the
             end of the continued line.  */
-         if (it->current_x > 0)
+         if (it->current_x > 0
+             && !it->truncate_lines_p /* Lines are continued.  */
+             && (/* And glyph doesn't fit on the line.  */
+                 new_x > it->last_visible_x
+                 /* Or it fits exactly and we're on a window
+                    system frame.  */
+                 || (new_x == it->last_visible_x
+                     && FRAME_WINDOW_P (it->f))))
            {
              if (it->current.dpvec_index >= 0
                  || it->current.overlay_string_index >= 0)
@@ -5407,6 +5418,7 @@ move_it_vertically_backward (it, dy)
 
   /* We are now surely at a line start.  */
   it->current_x = it->hpos = 0;
+  it->continuation_lines_width = 0;
 
   /* Move forward and see what y-distance we moved.  First move to the
      start of the next line so that we get its height.  We need this