Skip to content

Commit

Permalink
Merge branch 'fix_escape_sequences' into 'master'
Browse files Browse the repository at this point in the history
[fingerterm] Fixed handling of some escape sequences. Fixes JB#53068

See merge request mer-core/fingerterm!33
  • Loading branch information
llewelld committed Feb 5, 2021
2 parents c6ed48a + 8ab5586 commit d58150f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion terminal.cpp
Expand Up @@ -548,11 +548,15 @@ void Terminal::ansiSequence(const QString& seq)
QList<int> params;

int x=1;
while(x<seq.length()-1 && !QChar(seq.at(x)).isNumber())
while(x<seq.length()-1 && !QChar(seq.at(x)).isNumber() && seq.at(x)!=';')
x++;

QList<QString> tmp = seq.mid(x,seq.length()-x-1).split(';');
foreach(QString b, tmp) {
if(b.isEmpty()) {
params.append(0);
continue;
}
bool ok=false;
int t = b.toInt(&ok);
if(ok) {
Expand Down

0 comments on commit d58150f

Please sign in to comment.