aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-12 18:59:50 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-13 08:25:19 -0400
commit870f88f387dddeb5266a98839c0d431948671728 (patch)
tree80ab8f7932e60d53361107d0ed016dba0360b86a /src
parentd5eff30c72fda97aa5f075718b3e1fef7c1baa4f (diff)
downloadrneovim-870f88f387dddeb5266a98839c0d431948671728.tar.gz
rneovim-870f88f387dddeb5266a98839c0d431948671728.tar.bz2
rneovim-870f88f387dddeb5266a98839c0d431948671728.zip
vim-patch:8.1.0584: with search CTRL-L does not pick up composing characters
Problem: With search CTRL-L does not pick up composing characters. Solution: Check for composing characters. (Christian Brabandt, closes vim/vim#3682) [code change was accidentally included in 8.1.0579] https://github.com/vim/vim/commit/5f5e203c92365ac6399de3663637b73bf9fb6dfa
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_search.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim
index 2e2061f1ff..fe502f140d 100644
--- a/src/nvim/testdir/test_search.vim
+++ b/src/nvim/testdir/test_search.vim
@@ -994,6 +994,28 @@ func Test_no_last_substitute_pat()
call delete('Xviminfo')
endfunc
+func Test_search_Ctrl_L_combining()
+ " Make sure, that Ctrl-L works correctly with combining characters.
+ " It uses an artificial example of an 'a' with 4 combining chars:
+ " 'a' U+0061 Dec:97 LATIN SMALL LETTER A &#x61; /\%u61\Z "\u0061"
+ " ' ̀' U+0300 Dec:768 COMBINING GRAVE ACCENT &#x300; /\%u300\Z "\u0300"
+ " ' ́' U+0301 Dec:769 COMBINING ACUTE ACCENT &#x301; /\%u301\Z "\u0301"
+ " ' ̇' U+0307 Dec:775 COMBINING DOT ABOVE &#x307; /\%u307\Z "\u0307"
+ " ' ̣' U+0323 Dec:803 COMBINING DOT BELOW &#x323; /\%u323 "\u0323"
+ " Those should also appear on the commandline
+ if !has('multi_byte') || !exists('+incsearch')
+ return
+ endif
+ call Cmdline3_prep()
+ 1
+ let bufcontent = ['', 'Miạ̀́̇m']
+ call append('$', bufcontent)
+ call feedkeys("/Mi\<c-l>\<c-l>\<cr>", 'tx')
+ call assert_equal(5, line('.'))
+ call assert_equal(bufcontent[1], @/)
+ call Incsearch_cleanup()
+endfunc
+
func Test_large_hex_chars1()
" This used to cause a crash, the character becomes an NFA state.
try