mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Problem: Displayed digraph for "ga" wrong with 'encoding' "cp1251".
Solution: Convert from 'encoding' to "utf-8" if needed. (closes vim/vim#3015)
bc5020aa4d
This commit is contained in:
parent
5581ffac74
commit
b007e5d882
@ -1450,8 +1450,9 @@ int do_digraph(int c)
|
|||||||
|
|
||||||
/// Find a digraph for "val". If found return the string to display it.
|
/// Find a digraph for "val". If found return the string to display it.
|
||||||
/// If not found return NULL.
|
/// If not found return NULL.
|
||||||
char_u *get_digraph_for_char(int val)
|
char_u *get_digraph_for_char(int val_arg)
|
||||||
{
|
{
|
||||||
|
const int val = val_arg;
|
||||||
digr_T *dp;
|
digr_T *dp;
|
||||||
static char_u r[3];
|
static char_u r[3];
|
||||||
|
|
||||||
|
@ -465,4 +465,17 @@ func Test_show_digraph()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_show_digraph_cp1251()
|
||||||
|
throw 'skipped: Nvim supports ''utf8'' encoding only'
|
||||||
|
if !has('multi_byte')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
new
|
||||||
|
set encoding=cp1251
|
||||||
|
call Put_Dig("='")
|
||||||
|
call assert_equal("\n<\xfa> <|z> <M-z> 250, Hex fa, Oct 372, Digr ='", execute('ascii'))
|
||||||
|
set encoding=utf-8
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user