patch 8.0.1553: cannot see what digraph is used to insert a character
Problem: Cannot see what digraph is used to insert a character.
Solution: Show the digraph with the "ga" command. (Christian Brabandt)
diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim
index 6290680..271066d 100644
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -4,15 +4,15 @@
finish
endif
-func! Put_Dig(chars)
+func Put_Dig(chars)
exe "norm! o\<c-k>".a:chars
endfu
-func! Put_Dig_BS(char1, char2)
+func Put_Dig_BS(char1, char2)
exe "norm! o".a:char1."\<bs>".a:char2
endfu
-func! Test_digraphs()
+func Test_digraphs()
new
call Put_Dig("00")
call assert_equal("∞", getline('.'))
@@ -214,7 +214,7 @@
bw!
endfunc
-func! Test_digraphs_option()
+func Test_digraphs_option()
" reset whichwrap option, so that testing <esc><bs>A works,
" without moving up a line
set digraph ww=
@@ -420,7 +420,7 @@
bw!
endfunc
-func! Test_digraphs_output()
+func Test_digraphs_output()
new
let out = execute(':digraph')
call assert_equal('Eu € 8364', matchstr(out, '\C\<Eu\D*8364\>'))
@@ -436,7 +436,7 @@
bw!
endfunc
-func! Test_loadkeymap()
+func Test_loadkeymap()
if !has('keymap')
return
endif
@@ -450,7 +450,7 @@
bw!
endfunc
-func! Test_digraph_cmndline()
+func Test_digraph_cmndline()
" Create digraph on commandline
" This is a hack, to let Vim create the digraph in commandline mode
let s = ''
@@ -458,4 +458,11 @@
call assert_equal("€", s)
endfunc
+func Test_show_digraph()
+ new
+ call Put_Dig("e=")
+ call assert_equal("\n<ะต> 1077, Hex 0435, Oct 2065, Digr e=", execute('ascii'))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab