libvterm: Fix DECSTR (soft reset) command

See: https://bugs.launchpad.net/libvterm/+bug/2029441

Change-Id: Ia2411819818cb7f0f6dff7dcc2d7d7730cfc6e7f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-08-01 15:25:34 +02:00
parent a1fbc1a4b7
commit cb0597aeed
2 changed files with 2 additions and 1 deletions

View File

@@ -203,7 +203,7 @@ size_t vterm_input_write(VTerm *vt, const char *bytes, size_t len)
switch(vt->parser.state) {
case CSI_LEADER:
/* Extract leader bytes 0x3c to 0x3f */
if(c >= 0x3c && c <= 0x3f) {
if(c >= 0x3c && c <= 0x3f || c == '!') {
if(vt->parser.v.csi.leaderlen < CSI_LEADER_MAX-1)
vt->parser.v.csi.leader[vt->parser.v.csi.leaderlen++] = c;
break;

View File

@@ -934,6 +934,7 @@ static int on_csi(const char *leader, const long args[], int argcount, const cha
return 0;
switch(leader[0]) {
case '!':
case '?':
case '>':
leader_byte = leader[0];