aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-01-10 15:03:51 +0200
committerEli Zaretskii2015-01-10 15:03:51 +0200
commitb544ab561fcb575790c963a2eda51524fa366409 (patch)
tree2f02486d62f28aa58a2f09e82c58f4942d489025 /src
parent1f179ea1bac65d911c616dafbf7147f0dbb39afd (diff)
downloademacs-b544ab561fcb575790c963a2eda51524fa366409.tar.gz
emacs-b544ab561fcb575790c963a2eda51524fa366409.zip
Fix return value of vertical-motion at ZV (Bug#19553)
src/indent.c (Fvertical_motion): Return zero if we started from ZV and there's an overlay after-string there.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/indent.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 49152c886f3..6296302dc5e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12015-01-10 Eli Zaretskii <eliz@gnu.org>
2
3 * indent.c (Fvertical_motion): Return zero if we started from ZV
4 and there's an overlay after-string there. (Bug#19553)
5
12015-01-09 Eli Zaretskii <eliz@gnu.org> 62015-01-09 Eli Zaretskii <eliz@gnu.org>
2 7
3 * emacs.c (usage_message): Fix the description of the -nl switch. 8 * emacs.c (usage_message): Fix the description of the -nl switch.
diff --git a/src/indent.c b/src/indent.c
index 8b6ecd16a67..cadafcf2c30 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2137,10 +2137,15 @@ whether or not it is currently displayed in some window. */)
2137 if (nlines > 1) 2137 if (nlines > 1)
2138 move_it_by_lines (&it, min (PTRDIFF_MAX, nlines - 1)); 2138 move_it_by_lines (&it, min (PTRDIFF_MAX, nlines - 1));
2139 } 2139 }
2140 else 2140 else /* it_start = ZV */
2141 { 2141 {
2142 it.vpos = 0; 2142 it.vpos = 0;
2143 move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); 2143 move_it_by_lines (&it, min (PTRDIFF_MAX, nlines));
2144 /* We could have some display or overlay string at ZV,
2145 in which case it.vpos will be nonzero now, while
2146 actually we didn't move vertically at all. */
2147 if (IT_CHARPOS (it) == CHARPOS (pt) && CHARPOS (pt) == it_start)
2148 it.vpos = 0;
2144 } 2149 }
2145 } 2150 }
2146 2151