Skip to content

Commit 945085c

Browse files
committed
Input: correct the sequence parser
Correct the sequence parser to handle the parameter separator in the CSI sequence. The ASCII byte for the separator was incorrect and was adding an additional parameter (`0`).
1 parent d2b0a1d commit 945085c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/VirtualTerminal/Input/VTInputParser.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ extension VTInputParser {
302302
input = buffer
303303
return parse(next: &input)
304304

305-
case 0x38: // ';' (Parameter Separator)
306-
state = .CSI(parameters: parameters + [0], intermediate: intermediate)
305+
case 0x3b: // ';' (Parameter Separator)
306+
state = .CSI(parameters: parameters, intermediate: intermediate)
307307
input = input.dropFirst()
308308
return parse(next: &input)
309309

0 commit comments

Comments
 (0)