emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105785: Fix bug #9495 with cursor positioning on truncated lines.
Date: Thu, 15 Sep 2011 19:02:49 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105785
fixes bug(s): http://debbugs.gnu.org/9495
author: Johan Bockgard <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2011-09-15 19:02:49 +0300
message:
  Fix bug #9495 with cursor positioning on truncated lines.
  Patch by Johan Bockgוrd <address@hidden>
  
   src/xdisp.c (try_cursor_movement): Only check for exact match if
   cursor hpos found by set_cursor_from_row is valid.  (Bug#9495)
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-14 21:45:51 +0000
+++ b/src/ChangeLog     2011-09-15 16:02:49 +0000
@@ -1,3 +1,8 @@
+2011-09-15  Johan Bockgård  <address@hidden>
+
+       * xdisp.c (try_cursor_movement): Only check for exact match if
+       cursor hpos found by set_cursor_from_row is valid.  (Bug#9495)
+
 2011-09-14  Paul Eggert  <address@hidden>
 
        Remove unused external symbols.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-09-15 15:41:03 +0000
+++ b/src/xdisp.c       2011-09-15 16:02:49 +0000
@@ -14627,7 +14627,10 @@
                     is set, we are done.  */
                  at_zv_p =
                    MATRIX_ROW (w->current_matrix, 
w->cursor.vpos)->ends_at_zv_p;
-                 if (!at_zv_p)
+                 if (rv && !at_zv_p
+                     && w->cursor.hpos >= 0
+                     && w->cursor.hpos < MATRIX_ROW_USED (w->current_matrix,
+                                                          w->cursor.vpos))
                    {
                      struct glyph_row *candidate =
                        MATRIX_ROW (w->current_matrix, w->cursor.vpos);


reply via email to

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