To: vim_dev@googlegroups.com Subject: Patch 8.1.1350 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1350 Problem: "W" for wrapping not shown when more than 99 matches. Solution: Adjust check for length. (Masato Nishihata, closes #4388) Files: src/search.c, src/testdir/test_search_stat.vim *** ../vim-8.1.1349/src/search.c 2019-05-07 21:34:34.129561140 +0200 --- src/search.c 2019-05-18 19:22:44.982367336 +0200 *************** *** 5012,5018 **** } len = STRLEN(t); ! if (show_top_bot_msg && len + 3 < SEARCH_STAT_BUF_LEN) { STRCPY(t + len, " W"); len += 2; --- 5012,5018 ---- } len = STRLEN(t); ! if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN) { STRCPY(t + len, " W"); len += 2; *** ../vim-8.1.1349/src/testdir/test_search_stat.vim 2019-05-07 21:29:08.427331900 +0200 --- src/testdir/test_search_stat.vim 2019-05-18 19:22:44.982367336 +0200 *************** *** 40,51 **** --- 40,59 ---- let g:a = execute(':unsilent :norm! n') let stat = '\[>99/>99\]' call assert_match(pat .. stat, g:a) + call cursor(line('$'), 1) + let g:a = execute(':unsilent :norm! n') + let stat = '\[1/>99\] W' + call assert_match(pat .. stat, g:a) " 5) Many matches call cursor(1, 1) let g:a = execute(':unsilent :norm! n') let stat = '\[2/>99\]' call assert_match(pat .. stat, g:a) + call cursor(1, 1) + let g:a = execute(':unsilent :norm! N') + let stat = '\[>99/>99\] W' + call assert_match(pat .. stat, g:a) " 6) right-left if exists("+rightleft") *** ../vim-8.1.1349/src/version.c 2019-05-18 18:52:01.040972255 +0200 --- src/version.c 2019-05-18 19:24:44.485709184 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1350, /**/ -- For humans, honesty is a matter of degree. Engineers are always honest in matters of technology and human relationships. That's why it's a good idea to keep engineers away from customers, romantic interests, and other people who can't handle the truth. (Scott Adams - The Dilbert principle) /// 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 ///