On Mon, Oct 30, 2006 at 11:30:40AM +1000, John Orr wrote:
> Hi all,
>
> I'm using Suse Linux, with KDE, and have a vim function to set my window size
> on startup.
> The function just sets &columns and &lines, and calls winpos, depending upon
> various other variables I provide.
> Previously I was registering this function to be called by an autocmd on the
> GUIEnter event - but I found that the window seemed to be resized by the
> operating system afterwards.
> I tried changing to the VimEnter event which should come last - and that
> works most of the time, but not always.
> I tried inserting a 5 second sleep into my function triggered by VimEnter -
> so the operating system could mess around with the window size before I then
> set it to the size I want - but no, I get a 5 second delay, my window is then
> set to my size - and then reset by the OS.
> It's not dramatically reset - eg, I set it to 360 columns (spanning two
> monitors), and the OS reset it to 315. If I run my function again manually,
> it sets the 360 columns perfectly.
>
> I guess there may be some X related ways to achieve what I want - but all I
> really want to do is wait until after the operating system has had it's play
> with the window size, and then let my function go to work.
>
> Anyone got any hints please?
>
> Thanks in advance,
> John
If you are right that the OS is messing with your window, then this
may not help, but it does not hurt to try:
:verbose set lines? columns?
after starting up.
Somewhat more involved is to set 'verbose' to something big and log
all messages. If you are using vim 7.0, this is pretty easy:
:help 'verbosefile'
It is a little harder with earlier versions of vim. Again, this may not
help at all. On the other hand, if there is a way to fix it in your
vimrc file, then looking at these messages should point to it.
HTH --Benji Fisher