Patch 8.2.0884

11 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 1, 2020, 3:33:17 PM6/1/20
to vim...@googlegroups.com

Patch 8.2.0884
Problem: Searchcount() test fails on slower systems.
Solution: Set a longer timeout.
Files: src/search.c, src/testdir/test_search_stat.vim


*** ../vim-8.2.0883/src/search.c 2020-06-01 19:08:51.180259267 +0200
--- src/search.c 2020-06-01 21:31:51.877037242 +0200
***************
*** 36,42 ****
static void cmdline_search_stat(int dirc, pos_T *pos, pos_T *cursor_pos, int show_top_bot_msg, char_u *msgbuf, int recompute, int maxcount, long timeout);
static void update_search_stat(int dirc, pos_T *pos, pos_T *cursor_pos, searchstat_T *stat, int recompute, int maxcount, long timeout);

! #define SEARCH_STAT_DEF_TIMEOUT 20L
#define SEARCH_STAT_DEF_MAX_COUNT 99
#define SEARCH_STAT_BUF_LEN 12

--- 36,42 ----
static void cmdline_search_stat(int dirc, pos_T *pos, pos_T *cursor_pos, int show_top_bot_msg, char_u *msgbuf, int recompute, int maxcount, long timeout);
static void update_search_stat(int dirc, pos_T *pos, pos_T *cursor_pos, searchstat_T *stat, int recompute, int maxcount, long timeout);

! #define SEARCH_STAT_DEF_TIMEOUT 40L
#define SEARCH_STAT_DEF_MAX_COUNT 99
#define SEARCH_STAT_BUF_LEN 12

*** ../vim-8.2.0883/src/testdir/test_search_stat.vim 2020-06-01 17:28:31.515939699 +0200
--- src/testdir/test_search_stat.vim 2020-06-01 21:28:10.917405495 +0200
***************
*** 87,96 ****
\ searchcount(#{recompute: 0}))
call assert_equal(
\ #{current: 272, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: v:true, maxcount: 0}))
call assert_equal(
\ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0]}))
call cursor(line('$'), 1)
let g:a = execute(':unsilent :norm! n')
let stat = 'W \[1/>99\]'
--- 87,96 ----
\ searchcount(#{recompute: 0}))
call assert_equal(
\ #{current: 272, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: v:true, maxcount: 0, timeout: 200}))
call assert_equal(
\ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0], timeout: 200}))
call cursor(line('$'), 1)
let g:a = execute(':unsilent :norm! n')
let stat = 'W \[1/>99\]'
***************
*** 100,109 ****
\ searchcount(#{recompute: 0}))
call assert_equal(
\ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0}))
call assert_equal(
\ #{current: 271, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0]}))

" Many matches
call cursor(1, 1)
--- 100,109 ----
\ searchcount(#{recompute: 0}))
call assert_equal(
\ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0, timeout: 200}))
call assert_equal(
\ #{current: 271, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
! \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0], timeout: 200}))

" Many matches
call cursor(1, 1)
*** ../vim-8.2.0883/src/version.c 2020-06-01 21:13:08.520030259 +0200
--- src/version.c 2020-06-01 21:32:04.725012884 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 884,
/**/

--
hundred-and-one symptoms of being an internet addict:
251. You've never seen your closest friends who usually live WAY too far away.

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages