Skip to content

Commit 4be7dbf

Browse files
committed
unset raw mode on submit
1 parent b480679 commit 4be7dbf

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/lazy-parents-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/core": patch
3+
---
4+
5+
Ensure raw mode is unset on submit

packages/core/src/prompts/prompt.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ export default class Prompt {
9797
return new Promise<string|symbol>((resolve, reject) => {
9898
this.once('submit', () => {
9999
this.output.write(cursor.show);
100+
setRawMode(this.input, false);
100101
resolve(this.value);
101102
})
102103
this.once('cancel', () => {
103104
this.output.write(cursor.show);
105+
setRawMode(this.input, false);
104106
resolve(cancel);
105107
})
106108
})

0 commit comments

Comments
 (0)