diff options
| author | Eli Zaretskii | 2014-07-05 11:24:07 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-07-05 11:24:07 +0300 |
| commit | f2c74bf38322ec715bb93c259e3570c015af78cf (patch) | |
| tree | 359d08025c84371708fccdd22fcef034c9cf8aa6 /src | |
| parent | bf97132f839ca4717ffd173c7aa80d48feb254d5 (diff) | |
| download | emacs-f2c74bf38322ec715bb93c259e3570c015af78cf.tar.gz emacs-f2c74bf38322ec715bb93c259e3570c015af78cf.zip | |
A better fix for bug #17942.
src/xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
and there is a display property at that position, don't call
move_it_to to move to a position before window start.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dde148dc165..a3210b557c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | 2014-07-05 Eli Zaretskii <eliz@gnu.org> | 1 | 2014-07-05 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a | 3 | * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window, |
| 4 | display property at BEGV, don't call move_it_to to move to a | 4 | and there is a display property at that position, don't call |
| 5 | position before BEGV. (Bug#17942) | 5 | move_it_to to move to a position before window start. (Bug#17942) |
| 6 | 6 | ||
| 7 | 2014-07-05 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2014-07-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 8 | 8 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index f5ddf828314..f49710b21e5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1585,7 +1585,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1585 | /* Move to the last buffer position before the | 1585 | /* Move to the last buffer position before the |
| 1586 | display property. */ | 1586 | display property. */ |
| 1587 | start_display (&it3, w, top); | 1587 | start_display (&it3, w, top); |
| 1588 | if (start > BEGV) | 1588 | if (start > CHARPOS (top)) |
| 1589 | move_it_to (&it3, start - 1, -1, -1, -1, MOVE_TO_POS); | 1589 | move_it_to (&it3, start - 1, -1, -1, -1, MOVE_TO_POS); |
| 1590 | /* Move forward one more line if the position before | 1590 | /* Move forward one more line if the position before |
| 1591 | the display string is a newline or if it is the | 1591 | the display string is a newline or if it is the |