aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-07-05 10:38:13 +0300
committerEli Zaretskii2014-07-05 10:38:13 +0300
commitbf97132f839ca4717ffd173c7aa80d48feb254d5 (patch)
tree9cc739021bd25222eb6e33716ac4771f6e8ec788 /src
parent6246df666bc864c82e9436f929c1e04d200d1d25 (diff)
downloademacs-bf97132f839ca4717ffd173c7aa80d48feb254d5.tar.gz
emacs-bf97132f839ca4717ffd173c7aa80d48feb254d5.zip
Fix bug #17942 with pos-visible-in-window-p and image and BOB.
src/xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a display property at BEGV, don't call move_it_to to move to a position before BEGV.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6048522cdc4..dde148dc165 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-07-05 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a
4 display property at BEGV, don't call move_it_to to move to a
5 position before BEGV. (Bug#17942)
6
12014-07-05 Stefan Monnier <monnier@iro.umontreal.ca> 72014-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * syntax.c (find_defun_start): Try the cache even 9 * syntax.c (find_defun_start): Try the cache even
diff --git a/src/xdisp.c b/src/xdisp.c
index fe5d0f579d8..f5ddf828314 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1585,7 +1585,8 @@ 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 move_it_to (&it3, start - 1, -1, -1, -1, MOVE_TO_POS); 1588 if (start > BEGV)
1589 move_it_to (&it3, start - 1, -1, -1, -1, MOVE_TO_POS);
1589 /* Move forward one more line if the position before 1590 /* Move forward one more line if the position before
1590 the display string is a newline or if it is the 1591 the display string is a newline or if it is the
1591 rightmost character on a line that is 1592 rightmost character on a line that is