Skip to content

Commit

Permalink
Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
thedrlambda committed Nov 30, 2023
1 parent adc56e3 commit 157db22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Binary file modified dist/windows.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@merrymake/cli",
"version": "1.6.7",
"version": "1.6.8",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ function shortText(prompt, description, defaultValueArg) {
output(beforeCursor + afterCursor);
moveCursor(-afterCursor.length, 0);
}
else if (k === exports.DELETE && afterCursor.length > 0) {
else if ((k === exports.DELETE || k.charCodeAt(0) === 127) &&
afterCursor.length > 0) {
moveCursor(-beforeCursor.length, 0);
afterCursor = afterCursor.substring(1);
node_process_1.stdout.clearLine(1);
Expand All @@ -302,7 +303,7 @@ function shortText(prompt, description, defaultValueArg) {
output(beforeCursor + afterCursor);
moveCursor(-afterCursor.length, 0);
}
else if (/^[A-Za-z0-9@_, .-/:;#=&*?]+$/.test(k)) {
else if (/^[A-Za-z0-9@_, .-/:;#=&*?+]+$/.test(k)) {
moveCursor(-beforeCursor.length, 0);
beforeCursor += k;
node_process_1.stdout.clearLine(1);
Expand Down
7 changes: 5 additions & 2 deletions prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ export function shortText(
stdout.clearLine(1);
output(beforeCursor + afterCursor);
moveCursor(-afterCursor.length, 0);
} else if (k === DELETE && afterCursor.length > 0) {
} else if (
(k === DELETE || k.charCodeAt(0) === 127) &&
afterCursor.length > 0
) {
moveCursor(-beforeCursor.length, 0);
afterCursor = afterCursor.substring(1);
stdout.clearLine(1);
Expand All @@ -325,7 +328,7 @@ export function shortText(
stdout.clearLine(1);
output(beforeCursor + afterCursor);
moveCursor(-afterCursor.length, 0);
} else if (/^[A-Za-z0-9@_, .-/:;#=&*?]+$/.test(k)) {
} else if (/^[A-Za-z0-9@_, .-/:;#=&*?+]+$/.test(k)) {
moveCursor(-beforeCursor.length, 0);
beforeCursor += k;
stdout.clearLine(1);
Expand Down

0 comments on commit 157db22

Please sign in to comment.