Skip to content

Commit

Permalink
Merge pull request #50 from armoucar/patch-1
Browse files Browse the repository at this point in the history
fix: cursor 'move' starts from the first cent and jumps to after the collon
  • Loading branch information
codermarcos authored Jun 3, 2021
2 parents aafde39 + a96b63d commit 4eef37d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/implanter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {

if (input.maskArgs.cursor === 'start') {
newCaretPosition = 0;
} else if (input.maskArgs.cursor === 'end') {
} else if (input.maskArgs.cursor === 'end' || (input.maskArgs.cursor === 'move' && oldValue.length <= 1)) {
newCaretPosition = newValue.length;
}

Expand Down

0 comments on commit 4eef37d

Please sign in to comment.