Skip to content

Commit

Permalink
Fix display problem when deleting UTF-8 characters sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
mritd authored and ҈҈҈Luiz Branco committed Mar 8, 2018
1 parent 8debffa commit c0c0d3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ func (p *Prompt) Run() (string, error) {
input = ""
}
if len(input) > 0 {
input = input[:len(input)-1]
r := []rune(input)
input = string(r[:len(r)-1])
}
default:
if eraseDefault {
Expand Down

0 comments on commit c0c0d3a

Please sign in to comment.