Re: [dev] Anyone have the traditional vi working on the xterm?

From: pmarin <pacogeek_AT_gmail.com>
Date: Sat, 17 Apr 2010 14:34:06 +0200

I fixed the problem. The preprocesor definitions in the setsize
function (ex_tty.c) are hilarious.

I wrote a setsize function that works only with TIOCGWINSZ.

 void
setsize(void)
{
  register int l, i;
  struct winsize win;
  i = ioctl(0, TIOCGWINSZ, &win);
        TCOLUMNS = winsz.ws_col = win.ws_col;

        TLINES = winsz.ws_row = win.ws_row;

  i = TLINES;
     l = TLINES;
  options[WINDOW].ovalue = options[WINDOW].odefault = l - 1;
  options[SCROLL].ovalue = options[SCROLL].odefault = HC ? 11 : ((l-1) /
}

"#ifdef" stuff is harmful.

Cheers.

On Sat, Apr 17, 2010 at 12:20 PM, pmarin <pacogeek_AT_gmail.com> wrote:
> ctr-+l or ctrl+r are not working. I found where is the problem: The
> window[1]  (number of lines that are shown in the screen are not
> actualized when the screen are resized).
>
>
> [1] you can view the window with 'set window' (works also in vim).
>
> On Sat, Apr 17, 2010 at 10:24 AM, fffff <spambox_AT_hshhhhh.name> wrote:
>> I'm using vim and he resizing after i resize urxvt.
>> Try press ctrl+l - this combination redraw console, i often use it to
>> redraw stupied mc.
>>
>> On 4/17/10, pmarin <pacogeek_AT_gmail.com> wrote:
>>> This is not the problem. When I start vi in a xterm (or any terminal)
>>> vi use all the size but if I resize the xterm (dynamic or tiled), vi
>>> maintains the old size and  the screen become a mess when I edit text.
>>>
>>>
>>> On Fri, Apr 16, 2010 at 10:07 PM, Christoph Schied
>>> <Christoph.Schied_AT_uni-ulm.de> wrote:
>>>> On Fri, Apr 16, 2010 at 07:49:02PM +0100, Rob wrote:
>>>>> Which version do you mean by original vi?
>>>>> $ pacman -Qi vi
>>>>> [...]
>>>>> That works fine with my xterm, maybe you've got some strange Xdefaults?
>>>>
>>>> archlinux applies a patch to vi to increase the maximum screen size:
>>>> http://repos.archlinux.org/wsvn/packages/vi/trunk/increase-tube.patch
>>>>
>>>>
>>>
>>>
>>
>>
>
Received on Sat Apr 17 2010 - 12:34:06 UTC

This archive was generated by hypermail 2.2.0 : Sat Apr 17 2010 - 12:36:02 UTC