diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index 13df8ad4ac..410d7942c7 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1094,8 +1094,8 @@ the 1', 2' and 3' digraphs. ⌕ TR 2315 8981 TELEPHONE RECORDER ⌠ Iu 2320 8992 TOP HALF INTEGRAL ⌡ Il 2321 8993 BOTTOM HALF INTEGRAL - 〈 232A 9002 RIGHT-POINTING ANGLE BRACKET + ⟨ <[ 27E8 10040 LEFT MATHEMATICAL ANGLE BRACKET + ⟩ ]> 27E9 10041 RIGHT MATHEMATICAL ANGLE BRACKET ␣ Vs 2423 9251 OPEN BOX ⑀ 1h 2440 9280 OCR HOOK ⑁ 3h 2441 9281 OCR CHAIR diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index fae7deefab..059562175b 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -1052,8 +1052,8 @@ static digr_T digraphdefault[] = { 'T', 'R', 0x2315 }, { 'I', 'u', 0x2320 }, { 'I', 'l', 0x2321 }, - { '<', '/', 0x2329 }, - { '/', '>', 0x232a }, + { '<', '[', 0x27e8 }, + { ']', '>', 0x27e9 }, #define DG_START_OTHER2 0x2423 { 'V', 's', 0x2423 }, { '1', 'h', 0x2440 }, @@ -1200,6 +1200,8 @@ static digr_T digraphdefault[] = { '*', '_', 0x3005 }, { ';', '_', 0x3006 }, { '0', '_', 0x3007 }, + { '<', '/', 0x3008 }, + { '/', '>', 0x3009 }, { '<', '+', 0x300a }, { '>', '+', 0x300b }, { '<', '\'', 0x300c }, diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 92266a2cf7..ea93bb52a9 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1400,7 +1400,7 @@ stack traceback: for _, chunk in ipairs(screen.messages[1].content) do nl = nl + (chunk[2]:find('\n') and 1 or 0) end - eq(682, nl) + eq(683, nl) screen.messages = {} end, }) diff --git a/test/old/testdir/test_digraph.vim b/test/old/testdir/test_digraph.vim index 0a71cbba99..1c13b96ed5 100644 --- a/test/old/testdir/test_digraph.vim +++ b/test/old/testdir/test_digraph.vim @@ -616,5 +616,16 @@ func Test_digraph_getlist_function() call assert_fails('call digraph_getlist(0z12)', 'E1212: Bool required for argument 1') endfunc +func Test_digraph_angle_bracket_patch() + " Ensure that the deprecated angle brackets 2329/232A ('') are not used + call assert_notequal('〈', digraph_get('')) + " Ensure that the CJK angle brackets 3008/3009 ('') are used + call assert_equal('〈', digraph_get('')) + " Ensure that the mathematical angle brackets 27E8/27E9 ('<[',']>') are defined + call assert_equal('⟨', digraph_get('<[')) + call assert_equal('⟩', digraph_get(']>')) +endfunc " vim: shiftwidth=2 sts=2 expandtab