]> granicus.if.org Git - vim/commitdiff
patch 8.1.0584: with search CTRL-L does not pick up composing characters v8.1.0584
authorBram Moolenaar <Bram@vim.org>
Fri, 14 Dec 2018 14:47:03 +0000 (15:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 14 Dec 2018 14:47:03 +0000 (15:47 +0100)
Problem:    With search CTRL-L does not pick up composing characters.
Solution:   Check for composing characters. (Christian Brabandt, closes #3682)
            [code change was accidentally included in 8.1.0579]

src/testdir/test_search.vim
src/version.c

index eadb128e038e350c219b172326183deaf9a2688f..3c83dd197df65994473696d8bd06627b6cc79374 100644 (file)
@@ -1154,3 +1154,25 @@ 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
index 1c85bf1f62b8185d82f0f5c2d7bb89fb079af746..a25f262b887b843fd1a2b30f0721a6c720155b49 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    584,
 /**/
     583,
 /**/