Fix error when --query contains wide-length characters

This commit is contained in:
Junegunn Choi
2015-01-24 13:26:33 +09:00
parent 1476fc7f3b
commit 448132c46c
2 changed files with 9 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal {
prompt: opts.Prompt,
tac: opts.Sort == 0,
reverse: opts.Reverse,
cx: displayWidth(input),
cx: len(input),
cy: 0,
offset: 0,
yanked: []rune{},