From: Bram Moolenaar Date: Sun, 30 Dec 2018 10:38:57 +0000 (+0100) Subject: patch 8.1.0662: needlessly searching for tilde in string X-Git-Tag: v8.1.0662 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef0a1d5ed3566b91143d30ae9de3240f47c6e282;p=vim patch 8.1.0662: needlessly searching for tilde in string Problem: Needlessly searching for tilde in string. Solution: Only check the first character. (James McCoy, closes #3734) --- diff --git a/src/misc1.c b/src/misc1.c index 40d6f93c5..a55275100 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -4924,7 +4924,7 @@ home_replace( homedir_env = NULL; #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) - if (homedir_env != NULL && vim_strchr(homedir_env, '~') != NULL) + if (homedir_env != NULL && *homedir_env == '~') { int usedlen = 0; int flen; diff --git a/src/version.c b/src/version.c index c49e8692d..c2869ce76 100644 --- a/src/version.c +++ b/src/version.c @@ -799,6 +799,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 662, /**/ 661, /**/