Commit 7abf57f8 authored by Antonio Rojas's avatar Antonio Rojas

Fix unusable Sage session after a syntax error

When we are thrown to the additional input prompt, simply report and error and send an interrupt signal to exit.

Do not try to guess what the problem is and fix it: this might be caused by an unmatched opening bracket or closing bracket, in which case we would be stuck in the additional input prompt forever

BUG: 429078
parent 0c46c2b6
......@@ -143,8 +143,8 @@ void SageExpression::parseOutput(const QString& text)
//interrupt it and show an error message
if(endsWithAlternativePrompt)
{
// Exit from sage additional input mode by closing the bracket
static_cast<SageSession*>(session())->sendInputToProcess(QLatin1String(")\n"));
// Exit from sage additional input mode
static_cast<SageSession*>(session())->sendInputToProcess(QLatin1String("\x03"));
m_syntaxError = true;
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment