Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/pt-pr-code.cc @ 18293:7e297c293e4c gui-release
Fix pretty printing with debug prompt (bug #41204).
* pt-pr-code.cc (tree_print_code::newline): Add call to indent() to print
prefix for blank lines.
* pt-pr-code.cc (tree_print_code::print_comment_elt): Add call to indent() to
print prefix before comment lines.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 13 Jan 2014 10:48:05 -0800 |
parents | 175b392e91fe |
children | 75d7cde2dda4 |
comparison
equal
deleted
inserted
replaced
18292:bc139ccccef9 | 18293:7e297c293e4c |
---|---|
1216 { | 1216 { |
1217 if (suppress_newlines) | 1217 if (suppress_newlines) |
1218 os << alt_txt; | 1218 os << alt_txt; |
1219 else | 1219 else |
1220 { | 1220 { |
1221 // Print prefix for blank lines. | |
1222 indent (); | |
1223 | |
1221 os << "\n"; | 1224 os << "\n"; |
1222 | 1225 |
1223 beginning_of_line = true; | 1226 beginning_of_line = true; |
1224 } | 1227 } |
1225 } | 1228 } |
1266 char c = comment[i++]; | 1269 char c = comment[i++]; |
1267 | 1270 |
1268 if (c == '\n') | 1271 if (c == '\n') |
1269 { | 1272 { |
1270 if (prev_char_was_newline) | 1273 if (prev_char_was_newline) |
1271 os << "##"; | 1274 { |
1275 printed_something = true; | |
1276 | |
1277 indent (); | |
1278 | |
1279 os << "##"; | |
1280 } | |
1272 | 1281 |
1273 newline (); | 1282 newline (); |
1274 | 1283 |
1275 prev_char_was_newline = true; | 1284 prev_char_was_newline = true; |
1276 } | 1285 } |