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

updated for version 7.0087

This commit is contained in:
Bram Moolenaar
2005-06-17 22:00:15 +00:00
parent f7bbbc506e
commit e756604ff5
11 changed files with 93 additions and 24 deletions

View File

@@ -5717,6 +5717,11 @@ write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
struct yankreg *old_y_previous, *old_y_current;
long len;
if (maxlen >= 0)
len = maxlen;
else
len = (long)STRLEN(str);
/* Special case: '/' search pattern */
if (name == '/')
{
@@ -5724,6 +5729,26 @@ write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
return;
}
#ifdef FEAT_EVAL
if (name == '=')
{
char_u *p, *s;
p = vim_strnsave(str, (int)len);
if (p == NULL)
return;
if (must_append)
{
s = concat_str(get_expr_line_src(), p);
vim_free(p);
p = s;
}
set_expr_line(p);
return;
}
#endif
if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */
{
emsg_invreg(name);
@@ -5740,10 +5765,6 @@ write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len)
get_yank_register(name, TRUE);
if (!y_append && !must_append)
free_yank_all();
if (maxlen >= 0)
len = maxlen;
else
len = (long)STRLEN(str);
#ifndef FEAT_VISUAL
/* Just in case - make sure we don't use MBLOCK */
if (yank_type == MBLOCK)