To: vim_dev@googlegroups.com Subject: Patch 8.0.0446 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0446 Problem: The ";" command does not work after characters with a lower byte that is NUL. Solution: Properly check for not having a previous character. (Hirohito Higashi) Files: src/Makefile, src/search.c, src/testdir/test_alot_utf8.vim, src/testdir/test_charsearch_utf8.vim *** ../vim-8.0.0445/src/Makefile 2017-03-09 18:19:58.165107821 +0100 --- src/Makefile 2017-03-12 16:16:51.097072348 +0100 *************** *** 2099,2104 **** --- 2098,2104 ---- test_cdo \ test_channel \ test_charsearch \ + test_charsearch_utf8 \ test_changedtick \ test_cindent \ test_cmdline \ *** ../vim-8.0.0445/src/search.c 2017-03-01 22:17:01.946120304 +0100 --- src/search.c 2017-03-12 16:16:51.101072319 +0100 *************** *** 1643,1649 **** } else /* repeat previous search */ { ! if (*lastc == NUL) return FAIL; if (dir) /* repeat in opposite direction */ dir = -lastcdir; --- 1643,1653 ---- } else /* repeat previous search */ { ! if (*lastc == NUL ! #ifdef FEAT_MBYTE ! && lastc_bytelen == 1 ! #endif ! ) return FAIL; if (dir) /* repeat in opposite direction */ dir = -lastcdir; *** ../vim-8.0.0445/src/testdir/test_alot_utf8.vim 2017-03-08 22:55:14.914181221 +0100 --- src/testdir/test_alot_utf8.vim 2017-03-12 16:16:51.101072319 +0100 *************** *** 6,11 **** --- 6,12 ---- " files, so that they can be run by themselves. set belloff=all + source test_charsearch_utf8.vim source test_expr_utf8.vim source test_matchadd_conceal_utf8.vim source test_regexp_utf8.vim *** ../vim-8.0.0445/src/testdir/test_charsearch_utf8.vim 2017-03-12 16:32:04.946506262 +0100 --- src/testdir/test_charsearch_utf8.vim 2017-03-12 16:16:51.101072319 +0100 *************** *** 0 **** --- 1,22 ---- + " Tests for related f{char} and t{char} using utf-8. + if !has('multi_byte') + finish + endif + + " Test for t,f,F,T movement commands + function! Test_search_cmds() + new! + call setline(1, "・最初から最後まで最強のVimは最高") + 1 + normal! f最 + call assert_equal([0, 1, 4, 0], getpos('.')) + normal! ; + call assert_equal([0, 1, 16, 0], getpos('.')) + normal! 2; + call assert_equal([0, 1, 43, 0], getpos('.')) + normal! , + call assert_equal([0, 1, 28, 0], getpos('.')) + bw! + endfunction + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.0.0445/src/version.c 2017-03-11 20:03:37.845266804 +0100 --- src/version.c 2017-03-12 16:18:42.020286627 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 446, /**/ -- hundred-and-one symptoms of being an internet addict: 96. On Super Bowl Sunday, you followed the score by going to the Yahoo main page instead of turning on the TV. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///