0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.0025

This commit is contained in:
Bram Moolenaar
2004-12-27 21:59:20 +00:00
parent b5bf5b8fae
commit 86b6835997
41 changed files with 536 additions and 218 deletions

View File

@@ -1699,6 +1699,7 @@ free_buf_options(buf, free_p_ff)
clear_string_option(&buf->b_p_kp);
clear_string_option(&buf->b_p_mps);
clear_string_option(&buf->b_p_fo);
clear_string_option(&buf->b_p_flp);
clear_string_option(&buf->b_p_isk);
#ifdef FEAT_KEYMAP
clear_string_option(&buf->b_p_keymap);
@@ -2540,6 +2541,28 @@ setfname(buf, ffname, sfname, message)
return OK;
}
/*
* Crude way of changing the name of a buffer. Use with care!
* The name should be relative to the current directory.
*/
void
buf_set_name(fnum, name)
int fnum;
char_u *name;
{
buf_T *buf;
buf = buflist_findnr(fnum);
if (buf != NULL)
{
vim_free(buf->b_sfname);
vim_free(buf->b_ffname);
buf->b_sfname = vim_strsave(name);
buf->b_ffname = FullName_save(buf->b_sfname, FALSE);
buf->b_fname = buf->b_sfname;
}
}
/*
* Take care of what needs to be done when the name of buffer "buf" has
* changed.