diff --git a/.changeset/red-glasses-grin.md b/.changeset/red-glasses-grin.md new file mode 100644 index 0000000..b604cdb --- /dev/null +++ b/.changeset/red-glasses-grin.md @@ -0,0 +1,5 @@ +--- +"@clack/core": patch +--- + +Fixes a cursor display bug in terminals that do not support the "hidden" escape sequence. See [Issue #127](https://github.com/bombshell-dev/clack/issues/127). diff --git a/packages/core/src/prompts/text.ts b/packages/core/src/prompts/text.ts index f2e1b76..b1c6974 100644 --- a/packages/core/src/prompts/text.ts +++ b/packages/core/src/prompts/text.ts @@ -12,7 +12,7 @@ export default class TextPrompt extends Prompt { return this.value; } if (this.cursor >= this.value.length) { - return `${this.value}${color.inverse(color.hidden('_'))}`; + return `${this.value}█`; } const s1 = this.value.slice(0, this.cursor); const [s2, ...s3] = this.value.slice(this.cursor);