Skip to content

Commit 43f74af

Browse files
authored
Merge pull request manifoldco#133 from Wotzhs/master
masking input with empty rune to not increment the cursor position
2 parents 5c05132 + ad237b6 commit 43f74af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cursor.go

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ func (c *Cursor) Format() string {
124124

125125
// FormatMask replaces all input runes with the mask rune.
126126
func (c *Cursor) FormatMask(mask rune) string {
127+
if mask == ' ' {
128+
return format([]rune{}, c)
129+
}
130+
127131
r := make([]rune, len(c.input))
128132
for i := range r {
129133
r[i] = mask

0 commit comments

Comments
 (0)