emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105822: Fix bug #9530 on a TTY.


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105822: Fix bug #9530 on a TTY.
Date: Sun, 18 Sep 2011 18:48:12 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105822
fixes bug(s): http://debbugs.gnu.org/9530
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2011-09-18 18:48:12 +0300
message:
  Fix bug #9530 on a TTY.
  
   src/xdisp.c (display_line): Record maximum and minimum buffer
   positions even if no glyphs were produced (e.g., by a zero-width
   stretch).  Fixes bug#9530 on a TTY.  Under word-wrap, don't record
   buffer positions that will be removed from the glyph row because
   they don't fit.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-18 15:21:57 +0000
+++ b/src/ChangeLog     2011-09-18 15:48:12 +0000
@@ -1,3 +1,11 @@
+2011-09-18  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (display_line): Record maximum and minimum buffer
+       positions even if no glyphs were produced (e.g., by a zero-width
+       stretch).  Fixes bug#9530 on a TTY.  Under word-wrap, don't record
+       buffer positions that will be removed from the glyph row because
+       they don't fit.
+
 2011-09-18  YAMAMOTO Mitsuharu  <address@hidden>
 
        * xdisp.c (expose_window): Save original value of phys_cursor_on_p

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-09-18 15:21:57 +0000
+++ b/src/xdisp.c       2011-09-18 15:48:12 +0000
@@ -18704,11 +18704,6 @@
                      it->current_x = new_x;
                      it->continuation_lines_width += new_x;
                      ++it->hpos;
-                     /* Record the maximum and minimum buffer
-                        positions seen so far in glyphs that will be
-                        displayed by this row.  */
-                     if (it->bidi_p)
-                       RECORD_MAX_MIN_POS (it);
                      if (i == nglyphs - 1)
                        {
                          /* If line-wrap is on, check if a previous
@@ -18723,6 +18718,11 @@
                                  || IT_DISPLAYING_WHITESPACE (it)))
                            goto back_to_wrap;
 
+                         /* Record the maximum and minimum buffer
+                            positions seen so far in glyphs that will be
+                            displayed by this row.  */
+                         if (it->bidi_p)
+                           RECORD_MAX_MIN_POS (it);
                          set_iterator_to_next (it, 1);
                          if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
                            {
@@ -18740,6 +18740,8 @@
                                }
                            }
                        }
+                     else if (it->bidi_p)
+                       RECORD_MAX_MIN_POS (it);
                    }
                  else if (CHAR_GLYPH_PADDING_P (*glyph)
                           && !FRAME_WINDOW_P (it->f))
@@ -18870,6 +18872,10 @@
                  xassert (it->first_visible_x <= it->last_visible_x);
                }
            }
+         /* Even if this display element produced no glyphs at all,
+            we want to record its position.  */
+         if (it->bidi_p && nglyphs == 0)
+           RECORD_MAX_MIN_POS (it);
 
          row->ascent = max (row->ascent, it->max_ascent);
          row->height = max (row->height, it->max_ascent + it->max_descent);


reply via email to

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