(edit_complete_word_cmd): make correct charset conversion

...before insert autocompletion result.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Add tests for coverage the bug.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Add test_autocomplete_single() test

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
(edit_complete_word_cmd): don't get bytes directly from editor buffer.

(edit_get_match_keyword_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(editcmd_dialog_completion_show): adjust dialog position.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>