Mercurial > vim
comparison src/buffer.c @ 41:f529edb9bab3 v7.0025
updated for version 7.0025
author | vimboss |
---|---|
date | Mon, 27 Dec 2004 21:59:20 +0000 |
parents | f1d2a58883b9 |
children | c75153d791d0 |
comparison
equal
deleted
inserted
replaced
40:f1d2a58883b9 | 41:f529edb9bab3 |
---|---|
1697 clear_string_option(&buf->b_p_key); | 1697 clear_string_option(&buf->b_p_key); |
1698 #endif | 1698 #endif |
1699 clear_string_option(&buf->b_p_kp); | 1699 clear_string_option(&buf->b_p_kp); |
1700 clear_string_option(&buf->b_p_mps); | 1700 clear_string_option(&buf->b_p_mps); |
1701 clear_string_option(&buf->b_p_fo); | 1701 clear_string_option(&buf->b_p_fo); |
1702 clear_string_option(&buf->b_p_flp); | |
1702 clear_string_option(&buf->b_p_isk); | 1703 clear_string_option(&buf->b_p_isk); |
1703 #ifdef FEAT_KEYMAP | 1704 #ifdef FEAT_KEYMAP |
1704 clear_string_option(&buf->b_p_keymap); | 1705 clear_string_option(&buf->b_p_keymap); |
1705 ga_clear(&buf->b_kmap_ga); | 1706 ga_clear(&buf->b_kmap_ga); |
1706 #endif | 1707 #endif |
2536 buf->b_shortname = FALSE; | 2537 buf->b_shortname = FALSE; |
2537 #endif | 2538 #endif |
2538 | 2539 |
2539 buf_name_changed(buf); | 2540 buf_name_changed(buf); |
2540 return OK; | 2541 return OK; |
2542 } | |
2543 | |
2544 /* | |
2545 * Crude way of changing the name of a buffer. Use with care! | |
2546 * The name should be relative to the current directory. | |
2547 */ | |
2548 void | |
2549 buf_set_name(fnum, name) | |
2550 int fnum; | |
2551 char_u *name; | |
2552 { | |
2553 buf_T *buf; | |
2554 | |
2555 buf = buflist_findnr(fnum); | |
2556 if (buf != NULL) | |
2557 { | |
2558 vim_free(buf->b_sfname); | |
2559 vim_free(buf->b_ffname); | |
2560 buf->b_sfname = vim_strsave(name); | |
2561 buf->b_ffname = FullName_save(buf->b_sfname, FALSE); | |
2562 buf->b_fname = buf->b_sfname; | |
2563 } | |
2541 } | 2564 } |
2542 | 2565 |
2543 /* | 2566 /* |
2544 * Take care of what needs to be done when the name of buffer "buf" has | 2567 * Take care of what needs to be done when the name of buffer "buf" has |
2545 * changed. | 2568 * changed. |