comparison src/misc2.c @ 7617:80bc36419c21 v7.4.1108

commit https://github.com/vim/vim/commit/58adb14739fa240ca6020cede9ab1f1cb07bd90a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 21:50:51 2016 +0100 patch 7.4.1108 Problem: Expanding "~" halfway a file name. Solution: Handle the file name as one name. (Marco Hinz) Add a test. Closes https://github.com/vim/vim/issues/564.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Jan 2016 22:00:05 +0100
parents 87e607fb6853
children 1fded31d9e04
comparison
equal deleted inserted replaced
7616:054887dabb63 7617:80bc36419c21
5541 if (first == TRUE) 5541 if (first == TRUE)
5542 { 5542 {
5543 /* copy file name into NameBuff, expanding environment variables */ 5543 /* copy file name into NameBuff, expanding environment variables */
5544 save_char = ptr[len]; 5544 save_char = ptr[len];
5545 ptr[len] = NUL; 5545 ptr[len] = NUL;
5546 expand_env(ptr, NameBuff, MAXPATHL); 5546 expand_env_esc(ptr, NameBuff, MAXPATHL, FALSE, TRUE, NULL);
5547 ptr[len] = save_char; 5547 ptr[len] = save_char;
5548 5548
5549 vim_free(ff_file_to_find); 5549 vim_free(ff_file_to_find);
5550 ff_file_to_find = vim_strsave(NameBuff); 5550 ff_file_to_find = vim_strsave(NameBuff);
5551 if (ff_file_to_find == NULL) /* out of memory */ 5551 if (ff_file_to_find == NULL) /* out of memory */