diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-30 11:38:57 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-30 11:38:57 +0100 |
commit | ef0a1d5ed3566b91143d30ae9de3240f47c6e282 (patch) | |
tree | 68189a9bfb7396bbad063b819cc937b71bb6e417 /src/misc1.c | |
parent | a8bfa1727a370d659dc0ccc3f0fd1763b10b5457 (diff) | |
download | vim-git-ef0a1d5ed3566b91143d30ae9de3240f47c6e282.tar.gz |
patch 8.1.0662: needlessly searching for tilde in stringv8.1.0662
Problem: Needlessly searching for tilde in string.
Solution: Only check the first character. (James McCoy, closes #3734)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |