Re: [vim] garbage in small xterms
- "Dr. Charles E. Campbell" wrote:
> result resembles: (item on left is a scrollbar)Ah. My mistake - I was looking for <space> gapds, not missing-letter
> | | VIM- | | | <- usual iconify, whole-screen stuff
> | |1234567890|
> | |3456789012|
> | |5678901234|
> | |7890123456|
> | |90 |
> | | ~ |
> | | ~ |
> | | ~ |
> | | ~ |
gaps! Yes, my latest xter/vim does the very same thing at <= 11 chars.
Just tried with my gnome-terminal, and that's wrong too, but even more
so, & terribly inconsistently, so I'd write that one off for now.
cmdtool acts much the same.
Seems to me,
a) it *is* vim at fault, somehow miscalculating the terminal width.
b) if you shrink it such that it fails, at least with gnome-tool and
cmdtool you can 'nudge' the windows bigger & suddenly it works OK. Yep,
you can with xterm too, if you're persistent, and resize thge window in
tiny steps (even though they 'snap' the window size to a round no. of
chars!). A little more investiagtion, and the terminal *is* getting bigger
by one char, and 'showing' the missing letters.
I wonder now if it /is/ vim; I feel that somehow it is, but I can't be
=====================- http://www.racaldefence.com/ -===================
Neil Bird |
| If this .signature looks pants,
mailto:neil.bird@... | then just stop using Outlook!
> From: Neil Bird [mailto:neil.bird@...]I just tried the following, having a xterm/vim with 11 visible columns
> b) if you shrink it such that it fails, at least with gnome-tool and
> cmdtool you can 'nudge' the windows bigger & suddenly it
> works OK. Yep,
> you can with xterm too, if you're persistent, and resize thge
> window in
> tiny steps (even though they 'snap' the window size to a round no. of
> chars!). A little more investiagtion, and the terminal *is*
> getting bigger
> by one char, and 'showing' the missing letters.
>So do/am I
> I wonder now if it /is/ vim; I feel that somehow it is, but
> I can't be
> a) it *is* vim at fault, somehow miscalculating the terminal width.Vim appears to expect a minimum window size of 12 characters. The
vanishing characters begin appearing for me when I resize to 11.
Doing a ":set columns?" at that point (or any size less than that)
results in "columns=12".
Ok, I've checked the source, and there is a "MIN_COLUMNS" constant
in vim.h that equates to 12. In term.c, the function "check_winsize()"
sets the global "Columns" to "MIN_COLUMNS" if it is less than "MIN_COLUMNS".
Without checking deeper, I'd say that this function is called anytime
vim receives a SIGWINCH from the xterm. This would also explain why the
gui would not shrink smaller than 12 columns. So there appears to be
a hard limit of 12 columns minimum.
Free High Speed DSL Access:
Stephen P. Wall Redcom Laboratories, Inc. / __ /\/ ___/\
Steve_Wall@... One Redcom Center ___/ /\/ /_/ /\__\/
(716) 924-7550 Victor, NY 14564 /_____/ /_______/ /
x300 USA \_____\/\_______\/