From 52fab9c9b8d690de6e8754995c0027767d356146 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 9 Jun 2013 19:37:22 +0300 Subject: [PATCH] Fix bug #14575 with window-specific overlays with line-prefix or wrap-prefix. src/xdisp.c (get_it_property): If it->object is a buffer, pass to get-char-property the window that is being rendered, instead of the buffer, to support window-specific overlays. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf5a8c0ee1e..06b738e5043 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-06-09 Eli Zaretskii + + * xdisp.c (get_it_property): If it->object is a buffer, pass to + get-char-property the window that is being rendered, instead of + the buffer, to support window-specific overlays. (Bug#14575) + 2013-06-08 Eli Zaretskii * bidi.c (bidi_fetch_char): Accept additional argument, the window diff --git a/src/xdisp.c b/src/xdisp.c index 5ec72407191..2097929128b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18971,16 +18971,19 @@ push_prefix_prop (struct it *it, Lisp_Object prop) static Lisp_Object get_it_property (struct it *it, Lisp_Object prop) { - Lisp_Object position; + Lisp_Object position, object = it->object; - if (STRINGP (it->object)) + if (STRINGP (object)) position = make_number (IT_STRING_CHARPOS (*it)); - else if (BUFFERP (it->object)) - position = make_number (IT_CHARPOS (*it)); + else if (BUFFERP (object)) + { + position = make_number (IT_CHARPOS (*it)); + XSETWINDOW (object, it->w); + } else return Qnil; - return Fget_char_property (position, prop, it->object); + return Fget_char_property (position, prop, object); } /* See if there's a line- or wrap-prefix, and if so, push it on IT. */ -- 2.39.2