comparison src/ex_cmds.c @ 961:c06c658691e2 v7.0.087

updated for version 7.0-087
author vimboss
date Tue, 05 Sep 2006 14:31:54 +0000
parents b2dcb8457067
children 7644c80ca87b
comparison
equal deleted inserted replaced
960:8c8d07318d8d 961:c06c658691e2
2456 vim_free(fname); 2456 vim_free(fname);
2457 vim_free(sfname); 2457 vim_free(sfname);
2458 #ifdef FEAT_AUTOCMD 2458 #ifdef FEAT_AUTOCMD
2459 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); 2459 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
2460 #endif 2460 #endif
2461 /* Change directories when the 'acd' option is set. */
2462 DO_AUTOCHDIR
2461 } 2463 }
2462 /* print full file name if :cd used */ 2464 /* print full file name if :cd used */
2463 fileinfo(FALSE, FALSE, eap->forceit); 2465 fileinfo(FALSE, FALSE, eap->forceit);
2464 } 2466 }
2465 2467
2673 2675
2674 retval = buf_write(curbuf, ffname, fname, eap->line1, eap->line2, 2676 retval = buf_write(curbuf, ffname, fname, eap->line1, eap->line2,
2675 eap, eap->append, eap->forceit, TRUE, FALSE); 2677 eap, eap->append, eap->forceit, TRUE, FALSE);
2676 2678
2677 /* After ":saveas fname" reset 'readonly'. */ 2679 /* After ":saveas fname" reset 'readonly'. */
2678 if (eap->cmdidx == CMD_saveas && retval == OK) 2680 if (eap->cmdidx == CMD_saveas)
2679 curbuf->b_p_ro = FALSE; 2681 {
2682 if (retval == OK)
2683 curbuf->b_p_ro = FALSE;
2684 /* Change directories when the 'acd' option is set. */
2685 DO_AUTOCHDIR
2686 }
2680 } 2687 }
2681 2688
2682 theend: 2689 theend:
2683 #ifdef FEAT_BROWSE 2690 #ifdef FEAT_BROWSE
2684 vim_free(browse_file); 2691 vim_free(browse_file);
3545 /* It's like all lines in the buffer changed. Need to update 3552 /* It's like all lines in the buffer changed. Need to update
3546 * automatic folding. */ 3553 * automatic folding. */
3547 foldUpdateAll(curwin); 3554 foldUpdateAll(curwin);
3548 #endif 3555 #endif
3549 3556
3550 #ifdef FEAT_AUTOCHDIR 3557 /* Change directories when the 'acd' option is set. */
3551 if (p_acd && curbuf->b_ffname != NULL 3558 DO_AUTOCHDIR
3552 && vim_chdirfile(curbuf->b_ffname) == OK) 3559
3553 shorten_fnames(TRUE);
3554 #endif
3555 /* 3560 /*
3556 * Careful: open_buffer() and apply_autocmds() may change the current 3561 * Careful: open_buffer() and apply_autocmds() may change the current
3557 * buffer and window. 3562 * buffer and window.
3558 */ 3563 */
3559 lnum = curwin->w_cursor.lnum; 3564 lnum = curwin->w_cursor.lnum;
3716 } 3721 }
3717 3722
3718 if (p_im) 3723 if (p_im)
3719 need_start_insertmode = TRUE; 3724 need_start_insertmode = TRUE;
3720 3725
3721 #ifdef FEAT_AUTOCHDIR 3726 /* Change directories when the 'acd' option is set. */
3722 /* Change directories when the acd option is set on. */ 3727 DO_AUTOCHDIR
3723 if (p_acd && curbuf->b_ffname != NULL
3724 && vim_chdirfile(curbuf->b_ffname) == OK)
3725 shorten_fnames(TRUE);
3726 #endif
3727 3728
3728 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) 3729 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
3729 if (gui.in_use && curbuf->b_ffname != NULL) 3730 if (gui.in_use && curbuf->b_ffname != NULL)
3730 { 3731 {
3731 # ifdef FEAT_SUN_WORKSHOP 3732 # ifdef FEAT_SUN_WORKSHOP