Actually it works for me if set lines is not part of the function: set lines = 500; func Autolines() let &lines = max([float2nr(0.8*&lines),52]) endfunc au GUIEnter * call Autolines()
This is in Gentoo. :version VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 1 2009 02:15:17) Included patches: 1-303 Modified by Gentoo-7.2.303 --MZ On Dec 20, 3:31 am, John Little <[email protected]> wrote: > Earler, I said: > > > If I do > > > :set lines=500|echomsg &lines > > > I get 500 in the message history, but with > > > :set lines=500|redraw|echomsg &lines > > > I get 87. > > I just tried that on windows (earlier was vim-gtk) and set lines=500| > echomsg &lines gives 76, but adding your lines code to _gvimrc doesn't > work, with or without a redraw. > > :help gui suggests using the GUIEnter event. I tried: > > func Autolines() > set lines=500 " over zealous numbers of lines > let &lines = ((float2nr(0.85*&lines)>52)?float2nr(0.85*&lines):52) > endfunc > autocmd GUIEnter * call Autolines() > > in my _gvimrc on windows and it seemed to work, lines was set to 64. > I'll try it tomorrow on my vim-gtk on Kubuntu. > > Regards, John -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
