diff options
| author | Eli Zaretskii | 2014-07-05 12:53:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-07-05 12:53:50 +0300 |
| commit | 546c26b394b5b9c14cfef71c36ba8d8f6af8217d (patch) | |
| tree | 30a522afffd46f306769e06238c651971658879e /src | |
| parent | f2c74bf38322ec715bb93c259e3570c015af78cf (diff) | |
| download | emacs-546c26b394b5b9c14cfef71c36ba8d8f6af8217d.tar.gz emacs-546c26b394b5b9c14cfef71c36ba8d8f6af8217d.zip | |
Fix bug #17944 with pos-visible-in-window-p when there's image at window start.
src/xdisp.c (pos_visible_p): Fix condition for finding CHARPOS by the
first call to move_it_to.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a3210b557c7..89621bd54ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window, | 3 | * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window, |
| 4 | and there is a display property at that position, don't call | 4 | and there is a display property at that position, don't call |
| 5 | move_it_to to move to a position before window start. (Bug#17942) | 5 | move_it_to to move to a position before window start. (Bug#17942) |
| 6 | Fix condition for finding CHARPOS by the first call to move_it_to. | ||
| 7 | (Bug#17944) | ||
| 6 | 8 | ||
| 7 | 2014-07-05 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2014-07-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 8 | 10 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index f49710b21e5..913b57ed44b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1436,7 +1436,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1436 | (charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y); | 1436 | (charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y); |
| 1437 | 1437 | ||
| 1438 | if (charpos >= 0 | 1438 | if (charpos >= 0 |
| 1439 | && (((!it.bidi_p || it.bidi_it.scan_dir == 1) | 1439 | && (((!it.bidi_p || it.bidi_it.scan_dir != -1) |
| 1440 | && IT_CHARPOS (it) >= charpos) | 1440 | && IT_CHARPOS (it) >= charpos) |
| 1441 | /* When scanning backwards under bidi iteration, move_it_to | 1441 | /* When scanning backwards under bidi iteration, move_it_to |
| 1442 | stops at or _before_ CHARPOS, because it stops at or to | 1442 | stops at or _before_ CHARPOS, because it stops at or to |