# HG changeset patch # User Bram Moolenaar # Date 1546166706 -3600 # Node ID d7a8f390f6d2da47d51358204cfd5e1699587673 # Parent 813102a1eca03fe8b9dd3270a6afa2698d45d527 patch 8.1.0662: needlessly searching for tilde in string commit https://github.com/vim/vim/commit/ef0a1d5ed3566b91143d30ae9de3240f47c6e282 Author: Bram Moolenaar Date: Sun Dec 30 11:38:57 2018 +0100 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 https://github.com/vim/vim/issues/3734) diff --git a/src/misc1.c b/src/misc1.c --- 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 --- a/src/version.c +++ b/src/version.c @@ -800,6 +800,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 662, +/**/ 661, /**/ 660,