diff --git a/libinterp/parse-tree/pt-pr-code.cc b/libinterp/parse-tree/pt-pr-code.cc --- a/libinterp/parse-tree/pt-pr-code.cc +++ b/libinterp/parse-tree/pt-pr-code.cc @@ -1218,6 +1218,9 @@ os << alt_txt; else { + // Print prefix for blank lines. + indent (); + os << "\n"; beginning_of_line = true; @@ -1268,7 +1271,13 @@ if (c == '\n') { if (prev_char_was_newline) - os << "##"; + { + printed_something = true; + + indent (); + + os << "##"; + } newline ();