> 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.
>
> Any suggestion? Thanks.
>
> - Zhao
>
Experiments here show the following (while typing ex-commands manually 
in gvim 7.3.390 with GTK2/Gnome2 GUI):
If the GUI is maximized (truly maximized, not just with :set lines=999 
columns=9999 but by clicking the Maximize menu or widget), it is 
anchored to the screen borders; in that case setting a smaller font will 
increase 'lines', 'columns' and also winwidth(0)
If the GUI is not truly maximized, then setting a smaller font will keep 
'lines' and 'columns' unchanged and reduce the pixel size of the GUI. In 
that case winwidth(0) is also kept unchanged.
Trying to set 'lines' or 'columns' to a value bigger than the available 
screen space (also by increasing the 'guifont' size) will cause Vim to 
reduce 'lines' and 'columns' to something no bigger than what is now 
available onscreen. In this case winwidth(0) may also get reduced.
With no vertical splits present, I always see winwidth(0) == &columns
If you see something else, please answer the following:
- Which GUI flavour? (macvim, GTK2, Motif, Windows, ...)
- Which Vim version and patchlevel?
- Compiled by yourself (from which sources) or downloaded precompiled 
(from where)?
- Exact steps to reproduce; actual results; expected results
Best regards,
Tony.
-- 
The devil finds work for idle circuits to do.
-- 
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:
Post a Comment