To: vim_dev@googlegroups.com Subject: Patch 8.0.1483 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1483 Problem: Searchpair() might return an invalid value on timeout. Solution: When the second search times out, do not accept a match from the first search. (Daniel Hahler, closes #2552) Files: src/search.c *** ../vim-8.0.1482/src/search.c 2018-02-09 12:13:28.598612020 +0100 --- src/search.c 2018-02-09 15:35:03.883546448 +0100 *************** *** 973,979 **** --- 973,988 ---- NULL, NULL #endif )) == 0) + { + #ifdef FEAT_RELTIME + /* If the search timed out, we did find a match + * but it might be the wrong one, so that's not + * OK. */ + if (timed_out != NULL && *timed_out) + match_ok = FALSE; + #endif break; + } /* Need to get the line pointer again, a * multi-line search may have made it invalid. */ *** ../vim-8.0.1482/src/version.c 2018-02-09 15:05:58.682406498 +0100 --- src/version.c 2018-02-09 16:03:53.570915551 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1483, /**/ -- Futility Factor: No experiment is ever a complete failure - it can always serve as a negative example. /// 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 ///