Sunday, August 7, 2011

Re: BUG with :put=[..., ''] (was: A few questions about :append and ex)

diff --git a/src/ops.c b/src/ops.c
--- a/src/ops.c
+++ b/src/ops.c
@@ -3352,6 +3352,14 @@
if (*ptr == NUL)
{
y_type = MLINE;
+ /* Expression evaluated to insert a trailing
+ * empty line */
+ if (regname == '=')
+ {
+ if (y_array != NULL)
+ y_array[y_size] = (char_u *) "";
+ y_size++;
+ }
break;
}
}
On Do, 04 Aug 2011, Tim Chase wrote:

[fullquote, cause forwarding to vim-dev]
> On 08/04/2011 10:02 AM, ranousse@gmx.com wrote:
> >A remark about :put =list
> >I tried :put =[ 'str1', 'str2', '', 'str3', '' ]
> >the '' are here to insert empty lines.
> >The last one is not inserted.
>
> I see the same results here (the first empty string is added, the
> second/last one isn't) and I would call this a bug.

Attached patch fixes this bug.

regards
Christian
--
Vorteil kleiner Menschen: Sie werden bei Regen später naß.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: