emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102440: Fix bug #6687 with cursor po


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102440: Fix bug #6687 with cursor positioning after before-string from overlays.
Date: Fri, 19 Nov 2010 18:34:22 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102440
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2010-11-19 18:34:22 +0200
message:
  Fix bug #6687 with cursor positioning after before-string from overlays.
  
   xdisp.c (set_cursor_from_row): Display cursor after all the
   glyphs that come from an overlay.  Don't overstep the last glyph
   when skipping glyphs from an overlay.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-11-18 21:45:03 +0000
+++ b/src/ChangeLog     2010-11-19 16:34:22 +0000
@@ -1,3 +1,9 @@
+2010-11-19  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (set_cursor_from_row): Display cursor after all the
+       glyphs that come from an overlay.  Don't overstep the last glyph
+       when skipping glyphs from an overlay.  (Bug#6687)
+
 2010-11-18  Dan Nicolaescu  <address@hidden>
 
        * alloc.c (refill_memory_reserve): Move declaration ...

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-11-17 19:15:24 +0000
+++ b/src/xdisp.c       2010-11-19 16:34:22 +0000
@@ -12941,7 +12941,8 @@
                             cursor on that character's glyph.  */
                          EMACS_INT strpos = glyph->charpos;
 
-                         cursor = glyph;
+                         if (tem)
+                           cursor = glyph;
                          for (glyph += incr;
                               (row->reversed_p ? glyph > stop : glyph < stop)
                                 && EQ (glyph->object, str);
@@ -12958,7 +12959,7 @@
                                  cursor = glyph;
                                  break;
                                }
-                             if (glyph->charpos < strpos)
+                             if (tem && glyph->charpos < strpos)
                                {
                                  strpos = glyph->charpos;
                                  cursor = glyph;
@@ -12973,10 +12974,9 @@
                    }
                  /* This string is not what we want; skip all of the
                     glyphs that came from it.  */
-                 do
+                 while ((row->reversed_p ? glyph > stop : glyph < stop)
+                        && EQ (glyph->object, str))
                    glyph += incr;
-                 while ((row->reversed_p ? glyph > stop : glyph < stop)
-                        && EQ (glyph->object, str));
                }
              else
                glyph += incr;


reply via email to

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