Skip to content

Commit

Permalink
fix: input malfunction when pasting multiline text
Browse files Browse the repository at this point in the history
ref: #8
closes: #8
  • Loading branch information
lucas-labs committed Oct 3, 2022
1 parent c17a33c commit dcbfdbb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/input/core/key-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export function handleInput(
// do nothing
} else if (e.input) {
// any other input
e.input = e.input?.replace('\r\n', '\n');
const ansiStripped = stripAnsi(e.input);
const nextValue = value.slice(0, cursor) + ansiStripped + value.slice(cursor);

Expand Down

0 comments on commit dcbfdbb

Please sign in to comment.