Skip to content

Commit a32e9f6

Browse files
committed
readline: fix unit tests
1 parent c17d42b commit a32e9f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/internal/readline/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ function* emitKeys(stream) {
195195
const cmd = StringPrototypeSlice(s, cmdStart);
196196
let match;
197197

198-
if ((match = RegExpPrototypeExec(/^(?:(\d\d?)(?:;(\d))?[~^$]|(\d{3}~))$/, cmd))) {
199-
if (match[3]) {
200-
code += match[3];
198+
if ((match = RegExpPrototypeExec(/^(?:(\d\d?)(?:;(\d))?([~^$])|(\d{3}~))$/, cmd))) {
199+
if (match[4]) {
200+
code += match[4];
201201
} else {
202-
code += match[1];
202+
code += match[1] + match[3];
203203
modifier = (match[2] || 1) - 1;
204204
}
205205
} else if (

0 commit comments

Comments
 (0)