update to xterm 246. Has been in snapshots for some time.

This commit is contained in:
matthieu
2009-09-05 15:58:09 +00:00
parent 86fe704ca5
commit 3af530ab2b
46 changed files with 3860 additions and 2507 deletions

View File

@@ -1,9 +1,7 @@
/* $XTermId: cursor.c,v 1.46 2008/10/05 20:12:16 tom Exp $ */
/* $XFree86: xc/programs/xterm/cursor.c,v 3.20 2006/02/13 01:14:58 dickey Exp $ */
/* $XTermId: cursor.c,v 1.53 2009/08/09 17:23:25 tom Exp $ */
/*
* Copyright 2002-2007,2008 by Thomas E. Dickey
* Copyright 2002-2008,2009 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -128,8 +126,11 @@ CursorBack(XtermWidget xw, int n)
void
CursorForward(TScreen * screen, int n)
{
#if OPT_DEC_CHRSET
LineData *ld = getLineData(screen, screen->cur_row);
#endif
int next = screen->cur_col + n;
int max = CurMaxCol(screen, screen->cur_row);
int max = LineMaxCol(screen, ld);
if (next > max)
next = max;
@@ -250,8 +251,8 @@ AdjustSavedCursor(XtermWidget xw, int adjust)
{
TScreen *screen = &xw->screen;
if (screen->alternate) {
SavedCursor *sc = &screen->sc[screen->alternate == False];
if (screen->whichBuf) {
SavedCursor *sc = &screen->sc[0];
if (adjust > 0) {
TRACE(("AdjustSavedCursor %d -> %d\n", sc->row, sc->row - adjust));
@@ -267,7 +268,7 @@ void
CursorSave(XtermWidget xw)
{
TScreen *screen = &xw->screen;
SavedCursor *sc = &screen->sc[screen->alternate != False];
SavedCursor *sc = &screen->sc[screen->whichBuf];
sc->saved = True;
sc->row = screen->cur_row;
@@ -296,7 +297,7 @@ void
CursorRestore(XtermWidget xw)
{
TScreen *screen = &xw->screen;
SavedCursor *sc = &screen->sc[screen->alternate != False];
SavedCursor *sc = &screen->sc[screen->whichBuf];
/* Restore the character sets, unless we never did a save-cursor op.
* In that case, we'll reset the character sets.
@@ -351,6 +352,8 @@ CursorPrevLine(TScreen * screen, int count)
int
set_cur_row(TScreen * screen, int value)
{
TRACE(("set_cur_row %d vs %d\n", value, screen ? screen->max_row : -1));
assert(screen != 0);
assert(value >= 0);
assert(value <= screen->max_row);
@@ -361,6 +364,8 @@ set_cur_row(TScreen * screen, int value)
int
set_cur_col(TScreen * screen, int value)
{
TRACE(("set_cur_col %d vs %d\n", value, screen ? screen->max_col : -1));
assert(screen != 0);
assert(value >= 0);
assert(value <= screen->max_col);