From: Eli Zaretskii Date: Tue, 21 Jun 2016 13:14:10 +0000 (+0300) Subject: Fix vertical layout calculations when newline has line-height property X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/6cf8f0b74e45cec12756e99d3735e3906c515c5c Fix vertical layout calculations when newline has line-height property * src/xdisp.c (move_it_in_display_line_to): Reset the iterator's 'constrain_row_ascent_descent_p' flag after processing the newline, similar to what 'display_line' does. Without this, the flag remains set once set by x_produce_glyphs, and causes the vertical layout calculations to go awry, because Emacs thinks the screen lines have zero height. (Bug#23850) --- diff --git a/src/xdisp.c b/src/xdisp.c index bcb283f8fa..da0e84f004 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9038,6 +9038,11 @@ move_it_in_display_line_to (struct it *it, } else result = MOVE_NEWLINE_OR_CR; + /* If we've processed the newline, make sure this flag is + reset, as it must only be set when the newline itself is + processed. */ + if (result == MOVE_NEWLINE_OR_CR) + it->constrain_row_ascent_descent_p = false; break; }