2012/1/2 Tony Mechelynck:
> I'm redirecting this thread to the vim_mac group and adding Björn to the CC.

Thanks for bringing this to my attention Tony.

> On 02/01/12 03:33, Zhao Cai wrote:
>>>
>>> On 01/01/12 16:37, Zhao Cai wrote:
>>>>
>>>> Problem: Right after `set guifont=…`, `winwidth()` returns the old win
>>>> width instead of the new width which would be changed by new guifont size.
>>>>
>>>> I tried to call `redraw` between but it does not work.
>>
>> I just retested a few more times. The problem happens only when I use mac
>> lion's native full screen. For normal full screen, the winwidth function
>> works just fine.

MacVim is a multiprocess application where core Vim runs in one
process and the MacVim GUI runs in another.  When you call ":set
gfn=..." this causes an IPC message to be (asynchronously) sent to the
GUI which will then resize its window appropriately and then send
another message back to the Vim process telling it what the new window
size should be in order to fit on the screen.

Hence, if you try to get the window width right after setting 'gfn' it
will still tell you the old value because the IPC message that tells
Vim about the updated window dimensions have yet to arrive.

Fixing this problem will require a redesign to how MacVim resizes
windows, which is difficult I'm afraid.  I'd suggest you try to find
other ways around this problem.

Björn

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

Reply via email to