Mercurial > emacs
comparison src/indent.c @ 83408:39bb10ce301a
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-667
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-669
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-670
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-157
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-158
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-159
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-160
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-161
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-162
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-163
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-164
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-165
Update from CVS: texi/message.texi: Fix default values.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-166
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-167
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-168
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-448
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 11 Dec 2005 22:42:40 +0000 |
parents | 532e0a9335a9 a405a1787bef |
children | b98066f4aa10 |
comparison
equal
deleted
inserted
replaced
83407:37d0562504bf | 83408:39bb10ce301a |
---|---|
2074 } | 2074 } |
2075 else | 2075 else |
2076 { | 2076 { |
2077 int it_start; | 2077 int it_start; |
2078 int oselective; | 2078 int oselective; |
2079 int start_on_image_p; | 2079 int start_on_image_or_stretch_p; |
2080 | 2080 |
2081 SET_TEXT_POS (pt, PT, PT_BYTE); | 2081 SET_TEXT_POS (pt, PT, PT_BYTE); |
2082 start_display (&it, w, pt); | 2082 start_display (&it, w, pt); |
2083 | 2083 |
2084 /* Scan from the start of the line containing PT. If we don't | 2084 /* Scan from the start of the line containing PT. If we don't |
2086 really at some x > 0. The effect is, in continuation lines, that | 2086 really at some x > 0. The effect is, in continuation lines, that |
2087 we end up with the iterator placed at where it thinks X is 0, | 2087 we end up with the iterator placed at where it thinks X is 0, |
2088 while the end position is really at some X > 0, the same X that | 2088 while the end position is really at some X > 0, the same X that |
2089 PT had. */ | 2089 PT had. */ |
2090 it_start = IT_CHARPOS (it); | 2090 it_start = IT_CHARPOS (it); |
2091 start_on_image_p = (it.method == GET_FROM_IMAGE); | 2091 start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE |
2092 || it.method == GET_FROM_STRETCH); | |
2092 reseat_at_previous_visible_line_start (&it); | 2093 reseat_at_previous_visible_line_start (&it); |
2093 it.current_x = it.hpos = 0; | 2094 it.current_x = it.hpos = 0; |
2094 /* Temporarily disable selective display so we don't move too far */ | 2095 /* Temporarily disable selective display so we don't move too far */ |
2095 oselective = it.selective; | 2096 oselective = it.selective; |
2096 it.selective = 0; | 2097 it.selective = 0; |
2097 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); | 2098 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); |
2098 it.selective = oselective; | 2099 it.selective = oselective; |
2099 | 2100 |
2100 /* Move back if we got too far. This may happen if | 2101 /* Move back if we got too far. This may happen if |
2101 truncate-lines is on and PT is beyond right margin. | 2102 truncate-lines is on and PT is beyond right margin. |
2102 It may also happen if it_start is on an image -- | 2103 It may also happen if it_start is on an image or a stretch |
2103 in that case, don't go back. */ | 2104 glyph -- in that case, don't go back. */ |
2104 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 && !start_on_image_p) | 2105 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 |
2106 && !start_on_image_or_stretch_p) | |
2105 move_it_by_lines (&it, -1, 0); | 2107 move_it_by_lines (&it, -1, 0); |
2106 | 2108 |
2107 it.vpos = 0; | 2109 it.vpos = 0; |
2108 /* Do this even if LINES is 0, so that we move back | 2110 /* Do this even if LINES is 0, so that we move back |
2109 to the beginning of the current line as we ought. */ | 2111 to the beginning of the current line as we ought. */ |