emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100025: Fix cursor motion at end of


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100025: Fix cursor motion at end of line that ends in a composed character.
Date: Sat, 24 Apr 2010 14:11:40 +0300
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100025 [merge]
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2010-04-24 14:11:40 +0300
message:
  Fix cursor motion at end of line that ends in a composed character.
  
   xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
   use `get_next_display_element' and `set_iterator_to_next' to
   advance to the next character, when looking for the character that
   begins the next row.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-04-24 07:36:27 +0000
+++ b/src/ChangeLog     2010-04-24 11:11:40 +0000
@@ -1,6 +1,11 @@
 2010-04-24  Eli Zaretskii  <address@hidden>
 
-       * .gdbinit: Add a "set Fmake_symbol" line to force GDB load the
+       * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
+       use `get_next_display_element' and `set_iterator_to_next' to
+       advance to the next character, when looking for the character that
+       begins the next row.
+
+       * .gdbinit: Add a "set Fmake_symbol" line to force GDB to load the
        definition of "struct Lisp_Symbol".
 
 2010-04-24  Glenn Morris  <address@hidden>
@@ -55,6 +60,10 @@
 
        Support `display' text properties and overlay strings in bidi
        buffers.
+=======
+2010-04-23  Eli Zaretskii  <address@hidden>
+
+>>>>>>> MERGE-SOURCE
        * xdisp.c (pop_it): When the stack is popped after displaying
        from a string, bidi-iterate to exit from the text portion covered
        by the `display' property or overlay.  (Bug#5988, bug#5920)

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-04-23 18:23:51 +0000
+++ b/src/xdisp.c       2010-04-24 11:11:40 +0000
@@ -17969,17 +17969,20 @@
        }
       else if (row->used[TEXT_AREA] && max_pos)
        {
-         SET_TEXT_POS (tpos, max_pos + 1, CHAR_TO_BYTE (max_pos + 1));
+         SET_TEXT_POS (tpos, max_pos, CHAR_TO_BYTE (max_pos));
+         save_it = *it;
+         it->bidi_p = 0;
+         reseat (it, tpos, 0);
+         if (!get_next_display_element (it))
+           abort ();   /* row at ZV was already handled above */
+         set_iterator_to_next (it, 1);
          row_end = it->current;
-         row_end.pos = tpos;
          /* If the character at max_pos+1 is a newline, skip that as
             well.  Note that this may skip some invisible text.  */
-         if (FETCH_CHAR (tpos.bytepos) == '\n'
-             || (FETCH_CHAR (tpos.bytepos) == '\r' && it->selective))
+         if (!get_next_display_element (it))
+           abort ();
+         if (ITERATOR_AT_END_OF_LINE_P (it))
            {
-             save_it = *it;
-             it->bidi_p = 0;
-             reseat_1 (it, tpos, 0);
              set_iterator_to_next (it, 1);
              /* Record the position after the newline of a continued
                 row.  We will need that to set ROW->end of the last
@@ -17994,7 +17997,6 @@
                  row_end = it->current;
                  save_it.eol_pos.charpos = save_it.eol_pos.bytepos = 0;
                }
-             *it = save_it;
            }
          else if (!row->continued_p
                   && MATRIX_ROW_CONTINUATION_LINE_P (row)
@@ -18008,6 +18010,7 @@
              row_end.pos = it->eol_pos;
              it->eol_pos.charpos = it->eol_pos.bytepos = 0;
            }
+         *it = save_it;
          row->end = row_end;
        }
     }


reply via email to

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