1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

Fix an other cursor related regression introduced with 315. This patch will be

merged upstream.

Notified by:	naddy
Obtained from:	dickey@his.com (author)
This commit is contained in:
Emanuel Haupt 2015-03-26 22:53:16 +00:00
parent a8dc257c09
commit b352b3c8dd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=382349
2 changed files with 43 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= xterm
PORTVERSION= 316
PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= ftp://invisible-island.net/xterm/:src1 \
LOCAL/ehaupt:src1 LOCAL/ehaupt:src2

View File

@ -0,0 +1,42 @@
--- screen.c.orig 2015-03-07 01:19:23 UTC
+++ screen.c
@@ -1,4 +1,4 @@
-/* $XTermId: screen.c,v 1.510 2015/03/07 01:19:23 tom Exp $ */
+/* $XTermId: screen.c,v 1.512 2015/03/22 14:47:02 tom Exp $ */
/*
* Copyright 1999-2014,2015 by Thomas E. Dickey
@@ -1248,7 +1248,7 @@ ScrnInsertChar(XtermWidget xw, unsigned
TScreen *screen = TScreenOf(xw);
int first = ScrnLeftMargin(xw);
- int last = ScrnRightMargin(xw) + 1;
+ int last = ScrnRightMargin(xw);
int row = screen->cur_row;
int col = screen->cur_col;
int j;
@@ -1258,13 +1258,13 @@ ScrnInsertChar(XtermWidget xw, unsigned
TRACE(("ScrnInsertChar - col %d outside [%d..%d]\n", col, first, last));
return;
} else if (last < (col + (int) n)) {
- n = (unsigned) (last - col);
+ n = (unsigned) (last + 1 - col);
}
assert(screen->cur_col >= 0);
assert(screen->cur_row >= 0);
assert((int) n >= 0);
- assert(last >= (int) n);
+ assert((last + 1) >= (int) n);
if_OPT_WIDE_CHARS(screen, {
int xx = screen->cur_row;
@@ -1273,7 +1273,7 @@ ScrnInsertChar(XtermWidget xw, unsigned
if (DamagedCells(screen, n, &kl, (int *) 0, xx, kr) && kr > kl) {
ClearCells(xw, 0, (unsigned) (kr - kl + 1), row, kl);
}
- kr = last - (int) n;
+ kr = last - (int) n + 1;
if (DamagedCells(screen, n, &kl, (int *) 0, xx, kr) && kr > kl) {
ClearCells(xw, 0, (unsigned) (kr - kl + 1), row, kl);
}