comparison src/search.c @ 5398:eb33cadafcab v7.4.050

updated for version 7.4.050 Problem: "gn" selects too much for the pattern "\d" when there are two lines with a single digit. (Ryan Carney) Solution: Adjust the logic of is_one_char(). (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 02 Oct 2013 21:55:02 +0200
parents 3640cf4c0d4b
children 8f0c264db1e7
comparison
equal deleted inserted replaced
5397:20068068e3f9 5398:eb33cadafcab
4678 if (!called_emsg) 4678 if (!called_emsg)
4679 result = (nmatched != 0 4679 result = (nmatched != 0
4680 && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum 4680 && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
4681 && regmatch.startpos[0].col == regmatch.endpos[0].col); 4681 && regmatch.startpos[0].col == regmatch.endpos[0].col);
4682 4682
4683 if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col) 4683 if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
4684 result = TRUE; 4684 result = TRUE;
4685 } 4685 }
4686 4686
4687 called_emsg |= save_called_emsg; 4687 called_emsg |= save_called_emsg;
4688 vim_regfree(regmatch.regprog); 4688 vim_regfree(regmatch.regprog);
4689 return result; 4689 return result;