summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-01-09 14:48:16 -0500
committerChong Yidong <cyd@stupidchicken.com>2010-01-09 14:48:16 -0500
commit2f1c63846e4424829203007baf9a40f6e3e16e08 (patch)
tree0a4a1f9d92658ec584f600354b01866193e40e35
parentd427a9fad2840b356f6bb7bcb89fd654d506ed90 (diff)
downloademacs-2f1c63846e4424829203007baf9a40f6e3e16e08.tar.gz
* xdisp.c (pos_visible_p): Check for invisible text at the correct pos (Bug#4040).
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index bd9c6cfbfdf..e0faafaf2ca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * xdisp.c (pos_visible_p): Check for invisible text at the correct
+ position (Bug#4040).
+
2010-01-09 Eli Zaretskii <eliz@gnu.org>
* editfns.c (Ffloat_time): Doc fix.
diff --git a/src/xdisp.c b/src/xdisp.c
index 8d023fc5ae3..fd0f6e51695 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1363,7 +1363,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
int top_x = it.current_x;
int top_y = it.current_y;
enum it_method it_method = it.method;
- /* Calling line_bottom_y may change it.method. */
+ /* Calling line_bottom_y may change it.method, it.position, etc. */
int bottom_y = (last_height = 0, line_bottom_y (&it));
int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
@@ -1378,7 +1378,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
Lisp_Object window, prop;
XSETWINDOW (window, w);
- prop = Fget_char_property (make_number (it.position.charpos),
+ prop = Fget_char_property (make_number (charpos),
Qinvisible, window);
/* If charpos coincides with invisible text covered with an