Fix bug #2496 with column counting in presence of display tables.
authorEli Zaretskii <eliz@gnu.org>
Mon, 12 Sep 2011 11:51:27 +0000 (07:51 -0400)
committerEli Zaretskii <eliz@gnu.org>
Mon, 12 Sep 2011 11:51:27 +0000 (07:51 -0400)
 src/indent.c (compute_motion): Process display vector front to back
 rather than the other way around.

src/ChangeLog
src/indent.c

index 191462c..0cf5ee7 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * indent.c (compute_motion): Process display vector front to back
+       rather than the other way around.  (Bug#2496)
+
 2011-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
index 6e602d2..bae9ab1 100644 (file)
@@ -1543,7 +1543,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
              n = 1;
            }
 
-         for (i = n - 1; i >= 0; --i)
+         for (i = 0; i < n; ++i)
            {
              if (VECTORP (charvec))
                {