diff options
| author | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
| commit | fbf349734468d48b421c3d03074bb66dfcf3115b (patch) | |
| tree | 0a7d1ee844b6c591a5a499d23e35931945106e5a /src/indent.c | |
| parent | f0caabd962b662cccbea472995d86af718cc8d0b (diff) | |
| parent | 4b5fa40e1f1ba3cafde672863a0331311d1c2695 (diff) | |
| download | emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.tar.gz emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.zip | |
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
Add CVS metadata files.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
Update from CVS.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/indent.c b/src/indent.c index 2dc113a9086..68544e8059d 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Indentation functions. | 1 | /* Indentation functions. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001, |
| 3 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -2076,6 +2076,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2076 | { | 2076 | { |
| 2077 | int it_start; | 2077 | int it_start; |
| 2078 | int oselective; | 2078 | int oselective; |
| 2079 | int start_on_image_p; | ||
| 2079 | 2080 | ||
| 2080 | SET_TEXT_POS (pt, PT, PT_BYTE); | 2081 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 2081 | start_display (&it, w, pt); | 2082 | start_display (&it, w, pt); |
| @@ -2087,6 +2088,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2087 | 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 |
| 2088 | PT had. */ | 2089 | PT had. */ |
| 2089 | it_start = IT_CHARPOS (it); | 2090 | it_start = IT_CHARPOS (it); |
| 2091 | start_on_image_p = (it.method == GET_FROM_IMAGE); | ||
| 2090 | reseat_at_previous_visible_line_start (&it); | 2092 | reseat_at_previous_visible_line_start (&it); |
| 2091 | it.current_x = it.hpos = 0; | 2093 | it.current_x = it.hpos = 0; |
| 2092 | /* Temporarily disable selective display so we don't move too far */ | 2094 | /* Temporarily disable selective display so we don't move too far */ |
| @@ -2096,8 +2098,10 @@ whether or not it is currently displayed in some window. */) | |||
| 2096 | it.selective = oselective; | 2098 | it.selective = oselective; |
| 2097 | 2099 | ||
| 2098 | /* Move back if we got too far. This may happen if | 2100 | /* Move back if we got too far. This may happen if |
| 2099 | truncate-lines is on and PT is beyond right margin. */ | 2101 | truncate-lines is on and PT is beyond right margin. |
| 2100 | if (IT_CHARPOS (it) > it_start && XINT (lines) > 0) | 2102 | It may also happen if it_start is on an image -- |
| 2103 | in that case, don't go back. */ | ||
| 2104 | if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 && !start_on_image_p) | ||
| 2101 | move_it_by_lines (&it, -1, 0); | 2105 | move_it_by_lines (&it, -1, 0); |
| 2102 | 2106 | ||
| 2103 | it.vpos = 0; | 2107 | it.vpos = 0; |