completion: Fix omni completion of non-ascii tasks

vim uses bytes as column offsets, so we need to work with encoded
strings instead.
This commit is contained in:
Tomas Janousek 2020-12-30 00:03:34 +01:00 committed by Tomas Babej
parent 679e564194
commit 4c7cc5f551
2 changed files with 11 additions and 2 deletions

View file

@ -102,6 +102,14 @@ class TestCompletionIntegOmni(IntegrationTest):
self.client.eval('0') # wait for command completion
self.command("w", regex="written$", lines=1)
self.client.feedkeys('otest task ☺ -- pro\\<C-X>\\<C-O>A\\<C-X>\\<C-O>\\<Esc>')
self.client.eval('0') # wait for command completion
self.command("w", regex="written$", lines=1)
task = self.tw.tasks.pending()[1]
assert task['description'] == 'test task 2'
assert task['project'] == 'ABC'
task = self.tw.tasks.pending()[2]
assert task['description'] == 'test task ☺'
assert task['project'] == 'ABC'