Wednesday, October 27, 2010

Re: Resizing window not working in my plugin

On Wed, 27 Oct 2010, Benjamin R. Haskell wrote:

> On Wed, 27 Oct 2010, Martin Lundberg wrote:
>
>> Hi,
>>
>> I'm trying to write a buffer navigator plugin and it is somewhat
>> working but I'm having problems with the resize command. In my script
>> I fetch all the open buffers, and then I resize the window to the
>> same size as the number of buffers.
>>
>> http://github.com/marlun/vim-gotobuffer/blob/master/plugin/gotobuffer.vim#L48
>> is a link to the line which calls the method which runs resize and
>> http://github.com/marlun/vim-gotobuffer/blob/master/plugin/gotobuffer.vim#L95
>> is the resize call.
>>
>> For some reason the window is allways resized to 1 line even though
>> the argument sent to the s:set_window_height method is a bigger
>> number like 3.
>>
>> Would really appreciate an explenation of what I am doing wrong. As a
>> bonus if someone could also tell me why the buffer I create in my
>> plugin has a extra line added at the top that would be great too :)
>
> Guesing that it's 'winminheight' coming into play:
>
> :help 'winminheight'

Oy. Not my week. Read your initial email with '1' and '3' reversed.

What kind of buffer is in the window you're trying to resize? Quickfix
and preview windows have different sizing rules. Also, what version?
(My patch for preview windows not opening at the size of 'pvh' if 'pvh'
is less than 3 was just added in 7.3.044 -- guessing unrelated, but
timely.)

--
Best,
Ben

--
You received this message from the "vim_use" 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

No comments: