Mercurial > jwe > octave
changeset 21363:8cfd1b47d49f
Eliminate more extra newlines to stdout when not interactive (bug #47258)
* toplev.cc (main_loop): Only print newlines on interrupt or EOF when
running interactively.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 26 Feb 2016 13:13:38 -0800 |
parents | 1bb9a34011d1 |
children | 03ff9371596b |
files | libinterp/corefcn/toplev.cc |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.cc Sat Dec 12 16:18:57 2015 +0100 +++ b/libinterp/corefcn/toplev.cc Fri Feb 26 13:13:38 2016 -0800 @@ -740,7 +740,8 @@ return exit_status; // Required newline when the user does Ctrl+C at the prompt. - octave_stdout << "\n"; + if (interactive) + octave_stdout << "\n"; } catch (const index_exception& e) { @@ -784,7 +785,8 @@ } while (retval == 0); - octave_stdout << "\n"; + if (interactive) + octave_stdout << "\n"; if (retval == EOF) retval = 0;