From 80d61fb87be5ef96b1a28dc88699ade4aa7c83df Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 9 May 2015 22:23:54 +0200 Subject: tui: make termkey use utf-8 mode when &encoding=utf-8 #2469 --- src/nvim/option.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index a5ef6b6e7e..6b91224987 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3710,6 +3710,7 @@ did_set_string_option ( ml_setflags(curbuf); } } + if (errmsg == NULL) { /* canonize the value, so that STRCMP() can be used on it */ p = enc_canonize(*varp); @@ -3721,13 +3722,15 @@ did_set_string_option ( } } - if (errmsg == NULL) { /* When 'keymap' is used and 'encoding' changes, reload the keymap * (with another encoding). */ if (varp == &p_enc && *curbuf->b_p_keymap != NUL) (void)keymap_init(); + if (varp == &p_enc) { + ui_update_encoding(); + } } } else if (varp == &p_penc) { /* Canonize printencoding if VIM standard one */ -- cgit