diff options
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c index 33bf424b344..ee2e9c6fb71 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Indentation functions. | 1 | /* Indentation functions. |
| 2 | Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2015 Free Software | 2 | Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2016 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -2130,6 +2130,15 @@ whether or not it is currently displayed in some window. */) | |||
| 2130 | && it.method == GET_FROM_BUFFER | 2130 | && it.method == GET_FROM_BUFFER |
| 2131 | && it.c == '\n') | 2131 | && it.c == '\n') |
| 2132 | it_overshoot_count = 1; | 2132 | it_overshoot_count = 1; |
| 2133 | else if (it_overshoot_count == 1 && it.vpos == 0 | ||
| 2134 | && it.current_x < it.last_visible_x) | ||
| 2135 | { | ||
| 2136 | /* If we came to the same screen line as the one where | ||
| 2137 | we started, we didn't overshoot the line, and won't | ||
| 2138 | need to backtrack after all. This happens, for | ||
| 2139 | example, when PT is in the middle of a composition. */ | ||
| 2140 | it_overshoot_count = 0; | ||
| 2141 | } | ||
| 2133 | else if (disp_string_at_start_p && it.vpos > 0) | 2142 | else if (disp_string_at_start_p && it.vpos > 0) |
| 2134 | { | 2143 | { |
| 2135 | /* This is the case of a display string that spans | 2144 | /* This is the case of a display string that spans |