gvb@tnoibbc.UUCP (Gerlach van Beinum) (02/13/89)
Recently we received Version 3 of the X Window System.
There was an annoying bug in xterm. The escape sequence
to open a line (from vi) was not handled as it should
be. Some debugging led to a (hacker's?) solution :
In the routine CursorRestore someone subtracts
screen->top_marg from the current row, setting it to zero
most of the time. They didn't do this in Version 2.
This hack will probably have some strange effect's on
other programs, but vi works as it should!
The following is the code of routine CursorRestore in
file clients/xterm/cursor.c :
CursorRestore(term, sc)
register XtermWidget term;
register SavedCursor *sc;
{
register TScreen *screen = &term->screen;
Bcopy(sc->gsets, screen->gsets, sizeof(screen->gsets));
screen->curgl = sc->curgl;
screen->curgr = sc->curgr;
term->flags &= ~(BOLD|INVERSE|UNDERLINE|ORIGIN);
term->flags |= sc->flags & (BOLD|INVERSE|UNDERLINE|ORIGIN);
/* CursorSet(screen, sc->row - screen->top_marg, sc->col, term->flags); */
CursorSet(screen, sc->row, sc->col, term->flags);
}
--
------------------------------------------------------------------
Gerlach van Beinum USENET: gvb@tnoibbc PHONE: +31 15 606447
------------------------------------------------------------------