On 17-Jan-2014 Ingo Karkat <[email protected]> wrote:
> On 16-Jan-2014 23:46 +0100, Lech Lorens wrote:
> 
> > winnr() returns the index of the window 1-based while v:beval_winnr
> > (:help 'bexpr') is 0-based.  I believe the latter should be fixed.  The
> > attached patch adds increments the value of v:beval_winnr by 1.
> 
> The choosen base is unfortunate, but for backwards compatibility, I'd
> rather keep it 0-based. The help (which your patch fails to adapt)
> clearly mentions this:
> 
> ,----[ :h v:beval_winnr ]----
> | The first window has number zero (unlike most other places where a
> | window gets a number).
> `----

Thanks for pointing this out!  I didn't find this information in the 
surroundings of 'bexpr' so I assumed that it is undocumented and 
therefore a bug.  More like a bad design decision it seems.

How about adding a note where 'bexpr' is documented?  Or perhaps we 
could mark all the v:beval_* variables mentioned there as links (so that 
the next person knows there is a separate description for v:beval_lnum)?  
Or both – like in the attached patch.

-- 
Lech Lorens

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index ce0936a..2452bc3 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1094,11 +1094,11 @@ A jump table for the options with a short description can be found at |Q_op|.
 	Expression for text to show in evaluation balloon.  It is only used
 	when 'ballooneval' is on.  These variables can be used:
 
-	v:beval_bufnr	number of the buffer in which balloon is going to show
-	v:beval_winnr	number of the window
-	v:beval_lnum	line number
-	v:beval_col	column number (byte index)
-	v:beval_text	word under or after the mouse pointer
+	|v:beval_bufnr|	number of the buffer in which balloon is going to show
+	|v:beval_winnr|	number of the window (first window gets 0 here)
+	|v:beval_lnum|	line number
+	|v:beval_col|	column number (byte index)
+	|v:beval_text|	word under or after the mouse pointer
 
 	The evaluation of the expression must not have side effects!
 	Example: >

Raspunde prin e-mail lui