From 0985e784d8dce58748343207e176bf61303b7d68 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 2 Feb 2025 07:00:45 +0800 Subject: [PATCH] vim-patch:9.1.1065: no digraph for "Approaches the limit" (#32289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: no digraph for "Approaches the limit" Solution: Add the digraph using .= (Hans Ginzel) Add digraph Approaches the Limit ≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm closes: vim/vim#16508 https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6 Co-authored-by: Hans Ginzel --- runtime/doc/digraph.txt | 5 +++-- src/nvim/digraph.c | 1 + test/old/testdir/test_digraph.vim | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index 1e91e5e4b8..13df8ad4ac 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -119,8 +119,8 @@ see them. On most systems Vim uses the same digraphs. They work for the Unicode and ISO-8859-1 character sets. These default digraphs are taken from the RFC1345 -mnemonics. To make it easy to remember the mnemonic, the second character has -a standard meaning: +mnemonics (with some additions). To make it easy to remember the mnemonic, +the second character has a standard meaning: char name char meaning ~ Exclamation mark ! Grave @@ -1064,6 +1064,7 @@ the 1', 2' and 3' digraphs. ≅ ?= 2245 8773 APPROXIMATELY EQUAL TO ≈ ?2 2248 8776 ALMOST EQUAL TO ≌ =? 224C 8780 ALL EQUAL TO + ≐ .= 2250 8784 APPROACHES THE LIMIT ≓ HI 2253 8787 IMAGE OF OR APPROXIMATELY EQUAL TO ≠ != 2260 8800 NOT EQUAL TO ≡ =3 2261 8801 IDENTICAL TO diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index 326e929fb6..f32123e686 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -1023,6 +1023,7 @@ static digr_T digraphdefault[] = { '?', '=', 0x2245 }, { '?', '2', 0x2248 }, { '=', '?', 0x224c }, + { '.', '=', 0x2250 }, { 'H', 'I', 0x2253 }, { '!', '=', 0x2260 }, { '=', '3', 0x2261 }, diff --git a/test/old/testdir/test_digraph.vim b/test/old/testdir/test_digraph.vim index 9c32b85f61..0a71cbba99 100644 --- a/test/old/testdir/test_digraph.vim +++ b/test/old/testdir/test_digraph.vim @@ -40,6 +40,9 @@ func Test_digraphs() " Quadruple prime call Put_Dig("'4") call assert_equal("⁗", getline('.')) + " APPROACHES THE LIMIT + call Put_Dig(".=") + call assert_equal("≐", getline('.')) " Not a digraph call Put_Dig("a\") call Put_Dig("\a")