aboutsummaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorKim F. Storm2005-12-09 09:35:21 +0000
committerKim F. Storm2005-12-09 09:35:21 +0000
commite2de799989c016cd5ee095aa7eef044b49189f38 (patch)
treeca44d3feb55ce00a9c2e49cf81ffc77e8d7bd01a /src/indent.c
parent559202293294bb5d124f6567d5ffbbf509821f29 (diff)
downloademacs-e2de799989c016cd5ee095aa7eef044b49189f38.tar.gz
emacs-e2de799989c016cd5ee095aa7eef044b49189f38.zip
From: Kyotaro HORIGUCHI (tiny change)
(Fvertical_motion): Force move if starting on stretch glyph.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/indent.c b/src/indent.c
index 8809c563186..cd449044585 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2074,7 +2074,7 @@ whether or not it is currently displayed in some window. */)
2074 { 2074 {
2075 int it_start; 2075 int it_start;
2076 int oselective; 2076 int oselective;
2077 int start_on_image_p; 2077 int start_on_image_or_stretch_p;
2078 2078
2079 SET_TEXT_POS (pt, PT, PT_BYTE); 2079 SET_TEXT_POS (pt, PT, PT_BYTE);
2080 start_display (&it, w, pt); 2080 start_display (&it, w, pt);
@@ -2086,7 +2086,8 @@ whether or not it is currently displayed in some window. */)
2086 while the end position is really at some X > 0, the same X that 2086 while the end position is really at some X > 0, the same X that
2087 PT had. */ 2087 PT had. */
2088 it_start = IT_CHARPOS (it); 2088 it_start = IT_CHARPOS (it);
2089 start_on_image_p = (it.method == GET_FROM_IMAGE); 2089 start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE
2090 || it.method == GET_FROM_STRETCH);
2090 reseat_at_previous_visible_line_start (&it); 2091 reseat_at_previous_visible_line_start (&it);
2091 it.current_x = it.hpos = 0; 2092 it.current_x = it.hpos = 0;
2092 /* Temporarily disable selective display so we don't move too far */ 2093 /* Temporarily disable selective display so we don't move too far */
@@ -2097,9 +2098,10 @@ whether or not it is currently displayed in some window. */)
2097 2098
2098 /* Move back if we got too far. This may happen if 2099 /* Move back if we got too far. This may happen if
2099 truncate-lines is on and PT is beyond right margin. 2100 truncate-lines is on and PT is beyond right margin.
2100 It may also happen if it_start is on an image -- 2101 It may also happen if it_start is on an image or a stretch
2101 in that case, don't go back. */ 2102 glyph -- in that case, don't go back. */
2102 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 && !start_on_image_p) 2103 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0
2104 && !start_on_image_or_stretch_p)
2103 move_it_by_lines (&it, -1, 0); 2105 move_it_by_lines (&it, -1, 0);
2104 2106
2105 it.vpos = 0; 2107 it.vpos = 0;