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.
-- 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/src/gui_beval.c b/src/gui_beval.c index 146dbc4..00544e9 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -61,7 +61,7 @@ general_beval_cb(beval, state) # endif set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum); - set_vim_var_nr(VV_BEVAL_WINNR, winnr); + set_vim_var_nr(VV_BEVAL_WINNR, winnr + 1); set_vim_var_nr(VV_BEVAL_LNUM, (long)lnum); set_vim_var_nr(VV_BEVAL_COL, (long)(col + 1)); set_vim_var_string(VV_BEVAL_TEXT, text, -1);
