0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2018-12-30 11:38:57 +01:00
parent a8bfa1727a
commit ef0a1d5ed3
2 changed files with 3 additions and 1 deletions

View File

@@ -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;

View File

@@ -799,6 +799,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
662,
/**/
661,
/**/