aboutsummaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorChong Yidong2008-09-02 17:28:59 +0000
committerChong Yidong2008-09-02 17:28:59 +0000
commitd8a7e7fc775eec1e1bfadff2f82db6299731406f (patch)
tree7c9456275badc0bc70e94dd7eeee39477e9d4c83 /src/indent.c
parentefa09d5d1fa734f95dfc13ec0d6c6b5530f87e85 (diff)
downloademacs-d8a7e7fc775eec1e1bfadff2f82db6299731406f.tar.gz
emacs-d8a7e7fc775eec1e1bfadff2f82db6299731406f.zip
(Fvertical_motion): Don't call move_it_by_lines again if moving by a
single line.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/indent.c b/src/indent.c
index 7bef4949908..25d41a66f59 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2128,15 +2128,21 @@ whether or not it is currently displayed in some window. */)
2128 which might span multiple screen lines (e.g., if it's 2128 which might span multiple screen lines (e.g., if it's
2129 on a multi-line display string). We want to start 2129 on a multi-line display string). We want to start
2130 from the last line that it occupies. */ 2130 from the last line that it occupies. */
2131 it.vpos = 0;
2132 if (PT < ZV) 2131 if (PT < ZV)
2133 { 2132 {
2134 while (IT_CHARPOS (it) <= PT) 2133 while (IT_CHARPOS (it) <= PT)
2135 move_it_by_lines (&it, 1, 0); 2134 {
2136 move_it_by_lines (&it, XINT (lines) - 1, 0); 2135 it.vpos = 0;
2136 move_it_by_lines (&it, 1, 0);
2137 }
2138 if (XINT (lines) > 1)
2139 move_it_by_lines (&it, XINT (lines) - 1, 0);
2137 } 2140 }
2138 else 2141 else
2139 move_it_by_lines (&it, XINT (lines), 0); 2142 {
2143 it.vpos = 0;
2144 move_it_by_lines (&it, XINT (lines), 0);
2145 }
2140 } 2146 }
2141 } 2147 }
2142 2148