From 50c543d73abfecdec2561d5b998f628a090fd07b Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 6 May 2018 13:47:29 -1000 Subject: [PATCH] Add support for cursor up escape code --- hecl-gui/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hecl-gui/MainWindow.cpp b/hecl-gui/MainWindow.cpp index b9811089b..5684bcc21 100644 --- a/hecl-gui/MainWindow.cpp +++ b/hecl-gui/MainWindow.cpp @@ -523,7 +523,7 @@ void MainWindow::setTextTermFormatting(const QString& text) { m_inContinueNote = false; - QRegExp const escapeSequenceExpression(R"(\x1B\[([\d;\?F]+)([mlh]?))"); + QRegExp const escapeSequenceExpression(R"(\x1B\[([\d;\?FA]+)([mlh]?))"); QTextCharFormat defaultTextCharFormat = m_cursor.charFormat(); int offset = escapeSequenceExpression.indexIn(text); ReturnInsert(m_cursor, text.mid(0, offset)); @@ -542,7 +542,7 @@ void MainWindow::setTextTermFormatting(const QString& text) ParseEscapeSequence(attribute, i, textCharFormat, defaultTextCharFormat); } } - else if (captures.size() >= 2 && captures[1].endsWith('F')) + else if (captures.size() >= 2 && (captures[1].endsWith('F') || captures[1].endsWith('A'))) { int lineCount = captures[1].chopped(1).toInt(); if (!lineCount)