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

updated for version 7.0f04

This commit is contained in:
Bram Moolenaar
2006-04-28 22:38:25 +00:00
parent bd2ac7ec09
commit 5a30542f1e
9 changed files with 88 additions and 34 deletions

View File

@@ -2841,6 +2841,38 @@ restore_cmdline(ccp)
prev_ccline = *ccp;
}
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Save the command line into allocated memory. Returns a pointer to be
* passed to restore_cmdline_alloc() later.
* Returns NULL when failed.
*/
char_u *
save_cmdline_alloc()
{
struct cmdline_info *p;
p = (struct cmdline_info *)alloc((unsigned)sizeof(struct cmdline_info));
if (p != NULL)
save_cmdline(p);
return (char_u *)p;
}
/*
* Restore the command line from the return value of save_cmdline_alloc().
*/
void
restore_cmdline_alloc(p)
char_u *p;
{
if (p != NULL)
{
restore_cmdline((struct cmdline_info *)p);
vim_free(p);
}
}
#endif
/*
* paste a yank register into the command line.
* used by CTRL-R command in command-line mode