]> code.delx.au - gnu-emacs/commitdiff
Fix vertical layout calculations when newline has line-height property
authorEli Zaretskii <eliz@gnu.org>
Tue, 21 Jun 2016 13:14:10 +0000 (16:14 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 21 Jun 2016 13:14:10 +0000 (16:14 +0300)
* 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)

src/xdisp.c

index bcb283f8faa33892b51b29b9af76c9a3f49487f2..da0e84f00432247cee74fd5e108e24403bc56de6 100644 (file)
@@ -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;
        }