From: Kim F. Storm Date: Mon, 23 Jan 2006 13:14:01 +0000 (+0000) Subject: (handle_single_display_spec): Fix handling of space X-Git-Tag: emacs-pretest-22.0.90~4613 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d126cb60422a574c2479327e58ce3e58a96611de;p=emacs.git (handle_single_display_spec): Fix handling of space property on char from string: set *position rather than it->current.pos. (produce_stretch_glyph): Reduce width of stretch glyphs so they don't get wider than the window (unless truncate-lines is on). --- diff --git a/src/xdisp.c b/src/xdisp.c index a6632ddedf5..fa09c076467 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4148,7 +4148,7 @@ handle_single_display_spec (it, spec, object, position, { it->method = GET_FROM_STRETCH; it->object = value; - it->current.pos = it->position = start_pos; + *position = it->position = start_pos; } #ifdef HAVE_WINDOW_SYSTEM else @@ -19671,6 +19671,10 @@ produce_stretch_glyph (it) else ascent = (height * FONT_BASE (font)) / FONT_HEIGHT (font); + if (width > 0 && !it->truncate_lines_p + && it->current_x + width > it->last_visible_x) + width = it->last_visible_x - it->current_x - 1; + if (width > 0 && height > 0 && it->glyph_row) { Lisp_Object object = it->stack[it->sp - 1].string;