comparison src/fileio.c @ 1471:e980e93d2ac2 v7.1.186

updated for version 7.1-186
author vimboss
date Wed, 02 Jan 2008 20:08:25 +0000
parents c7654c4db8fd
children 1f93fbcb4e0c
comparison
equal deleted inserted replaced
1470:48b22e2eb1ed 1471:e980e93d2ac2
5554 return (int)(p - buf); 5554 return (int)(p - buf);
5555 } 5555 }
5556 #endif 5556 #endif
5557 5557
5558 #if defined(FEAT_VIMINFO) || defined(FEAT_BROWSE) || \ 5558 #if defined(FEAT_VIMINFO) || defined(FEAT_BROWSE) || \
5559 defined(FEAT_QUICKFIX) || defined(PROTO) 5559 defined(FEAT_QUICKFIX) || defined(FEAT_AUTOCMD) || defined(PROTO)
5560 /* 5560 /*
5561 * Try to find a shortname by comparing the fullname with the current 5561 * Try to find a shortname by comparing the fullname with the current
5562 * directory. 5562 * directory.
5563 * Returns "full_path" or pointer into "full_path" if shortened. 5563 * Returns "full_path" or pointer into "full_path" if shortened.
5564 */ 5564 */
8544 save_changed = curbuf->b_changed; 8544 save_changed = curbuf->b_changed;
8545 old_curbuf = curbuf; 8545 old_curbuf = curbuf;
8546 8546
8547 /* 8547 /*
8548 * Set the file name to be used for <afile>. 8548 * Set the file name to be used for <afile>.
8549 * Make a copy to avoid that changing a buffer name or directory makes it
8550 * invalid.
8549 */ 8551 */
8550 if (fname_io == NULL) 8552 if (fname_io == NULL)
8551 { 8553 {
8552 if (fname != NULL && *fname != NUL) 8554 if (fname != NULL && *fname != NUL)
8553 autocmd_fname = fname; 8555 autocmd_fname = fname;
8556 else 8558 else
8557 autocmd_fname = NULL; 8559 autocmd_fname = NULL;
8558 } 8560 }
8559 else 8561 else
8560 autocmd_fname = fname_io; 8562 autocmd_fname = fname_io;
8563 if (autocmd_fname != NULL)
8564 autocmd_fname = FullName_save(autocmd_fname, FALSE);
8561 8565
8562 /* 8566 /*
8563 * Set the buffer number to be used for <abuf>. 8567 * Set the buffer number to be used for <abuf>.
8564 */ 8568 */
8565 if (buf == NULL) 8569 if (buf == NULL)
8738 filechangeshell_busy = FALSE; 8742 filechangeshell_busy = FALSE;
8739 autocmd_nested = save_autocmd_nested; 8743 autocmd_nested = save_autocmd_nested;
8740 vim_free(sourcing_name); 8744 vim_free(sourcing_name);
8741 sourcing_name = save_sourcing_name; 8745 sourcing_name = save_sourcing_name;
8742 sourcing_lnum = save_sourcing_lnum; 8746 sourcing_lnum = save_sourcing_lnum;
8747 vim_free(autocmd_fname);
8743 autocmd_fname = save_autocmd_fname; 8748 autocmd_fname = save_autocmd_fname;
8744 autocmd_bufnr = save_autocmd_bufnr; 8749 autocmd_bufnr = save_autocmd_bufnr;
8745 autocmd_match = save_autocmd_match; 8750 autocmd_match = save_autocmd_match;
8746 #ifdef FEAT_EVAL 8751 #ifdef FEAT_EVAL
8747 current_SID = save_current_SID; 8752 current_SID = save_current_SID;