emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117233: Fix bug #17744 with cursor motion near o


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117233: Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.
Date: Wed, 11 Jun 2014 16:12:35 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117233
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17744
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-06-11 19:11:32 +0300
message:
  Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.
  
   src/xdisp.c (set_cursor_from_row): Fix an off-by-one error when
   matching overlay strings with 'cursor' property against buffer
   positions traversed in the glyph row.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-08 00:59:05 +0000
+++ b/src/ChangeLog     2014-06-11 16:11:32 +0000
@@ -1,3 +1,9 @@
+2014-06-11  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
+       matching overlay strings with 'cursor' property against buffer
+       positions traversed in the glyph row.  (Bug#17744)
+
 2014-06-08  Glenn Morris  <address@hidden>
 
        * fileio.c (write-region-inhibit-fsync): Doc tweak.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-05-25 14:18:46 +0000
+++ b/src/xdisp.c       2014-06-11 16:11:32 +0000
@@ -14421,7 +14421,7 @@
                                              pos_after, 0);
 
                if (prop_pos >= pos_before)
-                 bpos_max = prop_pos - 1;
+                 bpos_max = prop_pos;
              }
            if (INTEGERP (chprop))
              {
@@ -14495,7 +14495,7 @@
                                              pos_after, 0);
 
                if (prop_pos >= pos_before)
-                 bpos_max = prop_pos - 1;
+                 bpos_max = prop_pos;
              }
            if (INTEGERP (chprop))
              {
@@ -14525,7 +14525,7 @@
      GLYPH_BEFORE and GLYPH_AFTER.  */
   if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
        && BUFFERP (glyph->object) && glyph->charpos == pt_old)
-      && !(bpos_max < pt_old && pt_old <= bpos_covered))
+      && !(bpos_max <= pt_old && pt_old <= bpos_covered))
     {
       /* An empty line has a single glyph whose OBJECT is zero and
         whose CHARPOS is the position of a newline on that line.


reply via email to

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