mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 22:27:41 +00:00
Fix error when --query contains wide-length characters
This commit is contained in:
parent
1476fc7f3b
commit
448132c46c
@ -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{},
|
||||
|
@ -273,5 +273,13 @@ class TestGoFZF < MiniTest::Unit::TestCase
|
||||
tmux.until { |lines| lines[-1].include?('FIN') }
|
||||
assert_equal ['555555'], readonce.split($/)
|
||||
end
|
||||
|
||||
def test_query_unicode
|
||||
tmux.send_keys "(echo abc; echo 가나다) | fzf --query 가다 > #{TEMPNAME}", :Enter
|
||||
tmux.until { |lines| lines.last.start_with? '>' }
|
||||
tmux.send_keys :Enter
|
||||
tmux.until { |lines| lines[-1].include?('FIN') }
|
||||
assert_equal ['가나다'], readonce.split($/)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user