diff options
| author | Eli Zaretskii | 2013-04-13 11:54:02 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-13 11:54:02 +0300 |
| commit | 29b79ba19785cf3d5bbb3779779ca3a7714ee2e1 (patch) | |
| tree | edea1d94bb03e580429cff55b80e72980390f225 /src/indent.c | |
| parent | 011cddd649d81956ce13b9325b059dac78e61c4d (diff) | |
| download | emacs-29b79ba19785cf3d5bbb3779779ca3a7714ee2e1.tar.gz emacs-29b79ba19785cf3d5bbb3779779ca3a7714ee2e1.zip | |
Fix vertical cursor motion when there are overlay strings at EOL.
src/indent.c (Fvertical_motion): Don't consider display strings on
overlay strings as display strings on the buffer position we
started from. This prevents vertical cursor motion from jumping
more than one line when there's an overlay string with a display
property at end of line.
Reported by Karl Chen <Karl.Chen@quarl.org> in
http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c index 67796ab8a8f..47358e17db8 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2006,11 +2006,15 @@ whether or not it is currently displayed in some window. */) | |||
| 2006 | const char *s = SSDATA (it.string); | 2006 | const char *s = SSDATA (it.string); |
| 2007 | const char *e = s + SBYTES (it.string); | 2007 | const char *e = s + SBYTES (it.string); |
| 2008 | 2008 | ||
| 2009 | disp_string_at_start_p = | ||
| 2009 | /* If it.area is anything but TEXT_AREA, we need not bother | 2010 | /* If it.area is anything but TEXT_AREA, we need not bother |
| 2010 | about the display string, as it doesn't affect cursor | 2011 | about the display string, as it doesn't affect cursor |
| 2011 | positioning. */ | 2012 | positioning. */ |
| 2012 | disp_string_at_start_p = | 2013 | it.area == TEXT_AREA |
| 2013 | it.string_from_display_prop_p && it.area == TEXT_AREA; | 2014 | && it.string_from_display_prop_p |
| 2015 | /* A display string on anything but buffer text (e.g., on | ||
| 2016 | an overlay string) doesn't affect cursor positioning. */ | ||
| 2017 | && (it.sp > 0 && it.stack[it.sp - 1].method == GET_FROM_BUFFER); | ||
| 2014 | while (s < e) | 2018 | while (s < e) |
| 2015 | { | 2019 | { |
| 2016 | if (*s++ == '\n') | 2020 | if (*s++ == '\n') |