Tony Mechelynck wrote:

> Bug or feature? Unlike all other "window numbers" (count for Ctrl-W w, 
> return value from winnr() or tabpagewinnr(), etc.) which are 1-based 
> (top window is 1), v:beval_winnr is zero-based (top window is 0), as can 
> be ascertained with the following setting (in a Vim compiled with 
> +balloon_eval, of course):
> 
>       :set beval bexpr='buf:'.v:beval_bufnr.'\ win:'.v:beval_winnr.'\ 
> loc:'.v:beval_lnum.','.v:beval_col.'\ text:'.v:beval_text
> 
> Then hovering the mouse over text being edited shows that "win:" is 
> followed by a value one less than the current winnr(). AFAICT, this 
> inconsistency is not documented (if it is, I couldn't find it).

Yeah, this is unexpected.  However, changing it now will cause more
problems.  I'll add a note in the documentation.

> Also, with the same settings, one sees that v:beval_col is not a 
> "virtual column" (screen column) but a "byte offset from start-of-line". 
> For instance, hard tabs are counted as one "column" each regardless of 
> their actual displayed width.

That's to be expected and already documented.

> Since making v:beval_winnr one-based or v:beval_col "virtual" might 
> break compatibility, I propose to leave the current behaviour unchanged, 
> but to document it.
> 
> For the record, I did this test with gvim 7.3.118 (Huge version with 
> GTK2-GNOME GUI) running in GUI mode. AFAICT the ballon-eval feaure is 
> not available in Console mode (no error, just no balloon).

-- 
The term "free software" is defined by Richard M. Stallman as
being software that isn't necessarily for free.  Confusing?
Let's call it "Stallman software" then!
                                -- Bram Moolenaar

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Raspunde prin e-mail lui