Patch for jfbterm-0.4.6
-----------------------

* tvterm_set_region(): Now cursor is placed at the beginning of the
  status line after "tsl" (move to status line).

* tvterm_pop_pen_and_set_current_pen(): Optimized condition to check
  if cursor is located below the scrolling region.

Author: NAKAHASHI Ichiro <ichiro@nnip.org>


diff -u jfbterm-0.4.6/vterm.c.orig jfbterm-0.4.6/vterm.c
--- jfbterm-0.4.6/vterm.c.orig	2004-05-11 03:08:47.000000000 +0900
+++ jfbterm-0.4.6/vterm.c	2004-11-21 09:25:11.025021464 +0900
@@ -533,7 +533,7 @@
 	tpen_copy(&(p->pen), t);
 
 	if (p->pen.y < p->ymin) p->pen.y = p->ymin;
-	if (p->pen.y >= p->ymax-1) p->pen.y = p->ymax -1;
+	if (p->pen.y > p->ymax-1) p->pen.y = p->ymax -1;
 	
 	*base = t->prev;
 	free(t);
@@ -1139,7 +1139,7 @@
 	p->ymin = ymin;
 	p->ymax = ymax;
 	p->pen.x = 0;
-	if (p->pen.y < p->ymin || p->pen.y > p->ymax-1) p->pen.y = p->ymin-1;
+	if (p->pen.y < p->ymin || p->pen.y > p->ymax-1) p->pen.y = p->ymin;
 	p->wrap = FALSE;
 	if (p->ymin || p->ymax != p->ycap) {
 		p->soft = TRUE;
