aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-12-30 15:03:08 +0000
committerChong Yidong2008-12-30 15:03:08 +0000
commitaf2be00218e0daf21cde4c041f49df63b2e69460 (patch)
treec72a0829ba7105fcd6b4b1fddb6c741d96d16618 /src
parentd8abe9d8dd9bf0798a4381be1cb11ac92b5fb8bd (diff)
downloademacs-af2be00218e0daf21cde4c041f49df63b2e69460.tar.gz
emacs-af2be00218e0daf21cde4c041f49df63b2e69460.zip
(Fvertical_motion): Don't advance iterator if we have reseated to the
desired position.
Diffstat (limited to 'src')
-rw-r--r--src/indent.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/indent.c b/src/indent.c
index d30d2dc7293..aea60c3ce48 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2063,7 +2063,7 @@ whether or not it is currently displayed in some window. */)
2063 } 2063 }
2064 else 2064 else
2065 { 2065 {
2066 int it_start, oselective, first_x, it_overshoot_expected; 2066 int it_start, first_x, it_overshoot_expected;
2067 2067
2068 SET_TEXT_POS (pt, PT, PT_BYTE); 2068 SET_TEXT_POS (pt, PT, PT_BYTE);
2069 start_display (&it, w, pt); 2069 start_display (&it, w, pt);
@@ -2093,11 +2093,15 @@ whether or not it is currently displayed in some window. */)
2093 really at some x > 0. */ 2093 really at some x > 0. */
2094 reseat_at_previous_visible_line_start (&it); 2094 reseat_at_previous_visible_line_start (&it);
2095 it.current_x = it.hpos = 0; 2095 it.current_x = it.hpos = 0;
2096 /* Temporarily disable selective display so we don't move too far */ 2096 if (IT_CHARPOS (it) != PT)
2097 oselective = it.selective; 2097 {
2098 it.selective = 0; 2098 int oselective = it.selective;
2099 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 2099 /* Temporarily disable selective display so we don't move
2100 it.selective = oselective; 2100 too far */
2101 it.selective = 0;
2102 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
2103 it.selective = oselective;
2104 }
2101 2105
2102 if (XINT (lines) <= 0) 2106 if (XINT (lines) <= 0)
2103 { 2107 {