better repl output

master
Daniel Kolesa 2016-09-10 20:45:04 +02:00
parent dc5294bac3
commit 9f34c72b21
1 changed files with 4 additions and 2 deletions

View File

@ -217,8 +217,10 @@ static bool do_call(CsState &cs, ostd::ConstCharRange line, bool file = false) {
return true; return true;
} }
cs.get_out().writeln(col.empty() ? "stdin: " : "stdin:", err); cs.get_out().writeln(col.empty() ? "stdin: " : "stdin:", err);
cscript::util::print_stack(cs.get_out().iter(), st); if (st.get()) {
cs.get_out().write('\n'); cscript::util::print_stack(cs.get_out().iter(), st);
cs.get_out().write('\n');
}
return false; return false;
} }
signal(SIGINT, SIG_DFL); signal(SIGINT, SIG_DFL);