aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-31 18:10:12 +0200
committerEli Zaretskii2016-01-31 18:10:12 +0200
commita8273dacd51fc2dfa917722ad25390c64759318d (patch)
treeaee2c62160e4fa8b83aef314821d32ad9015b1ba /src
parentfc48106d0bdbd938ec51c1f9609b7a58108d8f00 (diff)
downloademacs-a8273dacd51fc2dfa917722ad25390c64759318d.tar.gz
emacs-a8273dacd51fc2dfa917722ad25390c64759318d.zip
Fix display of overlay strings with 'display' and 'box' property
* src/xdisp.c (get_next_display_element): Take the box face from display stack level that comes from a buffer, not an overlay string. (Bug#22499)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 78fddd60fc0..8f1e98d99ef 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7234,14 +7234,23 @@ get_next_display_element (struct it *it)
7234 buffer position is stored in the 'position' 7234 buffer position is stored in the 'position'
7235 member of the iteration stack slot below the 7235 member of the iteration stack slot below the
7236 current one, see handle_single_display_spec. By 7236 current one, see handle_single_display_spec. By
7237 contrast, it->current.pos was is not yet updated 7237 contrast, it->current.pos was not yet updated
7238 to point to that buffer position; that will 7238 to point to that buffer position; that will
7239 happen in pop_it, after we finish displaying the 7239 happen in pop_it, after we finish displaying the
7240 current string. Note that we already checked 7240 current string. Note that we already checked
7241 above that it->sp is positive, so subtracting one 7241 above that it->sp is positive, so subtracting one
7242 from it is safe. */ 7242 from it is safe. */
7243 if (it->from_disp_prop_p) 7243 if (it->from_disp_prop_p)
7244 pos = (it->stack + it->sp - 1)->position; 7244 {
7245 int stackp = it->sp - 1;
7246
7247 /* Find the stack level with data from buffer. */
7248 while (stackp >= 0
7249 && STRINGP ((it->stack + stackp)->string))
7250 stackp--;
7251 eassert (stackp >= 0);
7252 pos = (it->stack + stackp)->position;
7253 }
7245 else 7254 else
7246 INC_TEXT_POS (pos, it->multibyte_p); 7255 INC_TEXT_POS (pos, it->multibyte_p);
7247 7256