Hi ZyX!
On So, 16 Jan 2011, ZyX wrote:
> Consider the following script:
> vim -u NONE -c 'redir! > tick' \
> -c 'echo string(getbufvar(bufnr("%"), "changedtick"))' \
> -c 'echo b:changedtick' \
> -c 'qa!'
> It ends up having
>
> ''
> 2
> in the ./tick file, while there should be
>
> 2
> 2
> . Tested on vim-7.3.99 (revision 85c5a72551e2).
This patch fixes it:
diff --git a/src/eval.c b/src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
@@ -10888,6 +10888,11 @@
if (*varname == '&') /* buffer-local-option */
get_option_tv(&varname, rettv, TRUE);
+ else if (STRNCMP(varname, "changedtick", 11) == 0)
+ {
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = curbuf->b_changedtick;
+ }
else
{
if (*varname == NUL)
regards,
Christian
--
You received this message from the "vim_dev" 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