From fa819fed539dd8de122709d94fe28ed8f4901e4a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 12 Sep 2011 07:51:27 -0400 Subject: [PATCH] Fix bug #2496 with column counting in presence of display tables. src/indent.c (compute_motion): Process display vector front to back rather than the other way around. --- src/ChangeLog | 5 +++++ src/indent.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 191462cb10..0cf5ee725d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-09-12 Eli Zaretskii + + * indent.c (compute_motion): Process display vector front to back + rather than the other way around. (Bug#2496) + 2011-09-12 Stefan Monnier * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. diff --git a/src/indent.c b/src/indent.c index 6e602d28f6..bae9ab1b46 100644 --- a/src/indent.c +++ b/src/indent.c @@ -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)) { -- 2.20.1