comparison src/search.c @ 27752:c1d1639b52dd v8.2.4402

patch 8.2.4402: missing parenthesis may cause unexpected problems Commit: https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83 Author: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed Feb 16 19:24:07 2022 +0000 patch 8.2.4402: missing parenthesis may cause unexpected problems Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. (closes https://github.com/vim/vim/issues/9788)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Feb 2022 20:30:03 +0100
parents 4c68fb88b73f
children ae38d2e81fca
comparison
equal deleted inserted replaced
27751:c9330d10419b 27752:c1d1639b52dd
4298 // bonus if match is uppercase and prev is lower 4298 // bonus if match is uppercase and prev is lower
4299 #define CAMEL_BONUS 30 4299 #define CAMEL_BONUS 30
4300 // bonus if the first letter is matched 4300 // bonus if the first letter is matched
4301 #define FIRST_LETTER_BONUS 15 4301 #define FIRST_LETTER_BONUS 15
4302 // penalty applied for every letter in str before the first match 4302 // penalty applied for every letter in str before the first match
4303 #define LEADING_LETTER_PENALTY -5 4303 #define LEADING_LETTER_PENALTY (-5)
4304 // maximum penalty for leading letters 4304 // maximum penalty for leading letters
4305 #define MAX_LEADING_LETTER_PENALTY -15 4305 #define MAX_LEADING_LETTER_PENALTY (-15)
4306 // penalty for every letter that doesn't match 4306 // penalty for every letter that doesn't match
4307 #define UNMATCHED_LETTER_PENALTY -1 4307 #define UNMATCHED_LETTER_PENALTY (-1)
4308 // penalty for gap in matching positions (-2 * k) 4308 // penalty for gap in matching positions (-2 * k)
4309 #define GAP_PENALTY -2 4309 #define GAP_PENALTY (-2)
4310 // Score for a string that doesn't fuzzy match the pattern 4310 // Score for a string that doesn't fuzzy match the pattern
4311 #define SCORE_NONE -9999 4311 #define SCORE_NONE (-9999)
4312 4312
4313 #define FUZZY_MATCH_RECURSION_LIMIT 10 4313 #define FUZZY_MATCH_RECURSION_LIMIT 10
4314 4314
4315 /* 4315 /*
4316 * Compute a score for a fuzzy matched string. The matching character locations 4316 * Compute a score for a fuzzy matched string. The matching character locations