0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0075

This commit is contained in:
Bram Moolenaar
2005-05-22 22:09:40 +00:00
parent 2389c3c640
commit de934d77b1
4 changed files with 34 additions and 5 deletions

View File

@@ -783,6 +783,17 @@ get_expr_line()
vim_free(expr_copy);
return rv;
}
/*
* Get the '=' register expression itself, without evaluating it.
*/
char_u *
get_expr_line_src()
{
if (expr_line == NULL)
return NULL;
return vim_strsave(expr_line);
}
#endif /* FEAT_EVAL */
/*
@@ -5588,9 +5599,10 @@ get_reg_type(regname, reglen)
* Returns NULL for error.
*/
char_u *
get_reg_contents(regname, allowexpr)
get_reg_contents(regname, allowexpr, expr_src)
int regname;
int allowexpr; /* allow "=" register. */
int allowexpr; /* allow "=" register */
int expr_src; /* get expression for "=" register */
{
long i;
char_u *retval;
@@ -5601,7 +5613,11 @@ get_reg_contents(regname, allowexpr)
if (regname == '=')
{
if (allowexpr)
{
if (expr_src)
return get_expr_line_src();
return get_expr_line();
}
return NULL;
}