From owner-freebsd-hackers Thu Jan 12 17:52:20 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id RAA20108 for hackers-outgoing; Thu, 12 Jan 1995 17:52:20 -0800 Received: from dino.trl.ibm.co.jp (dino.trl.ibm.co.jp [192.156.220.66]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id RAA20096 for ; Thu, 12 Jan 1995 17:52:16 -0800 Received: from ns.trl.ibm.com ([9.116.1.23]) by dino.trl.ibm.co.jp (5.65c/2.7Wd) id AA19082; Fri, 13 Jan 1995 10:52:00 +0900 Received: from taka.trl.ibm.com by ns.trl.ibm.com (AIX 3.2/UCB 5.64/TRL4.1SRV) id AA18255; Fri, 13 Jan 1995 10:51:55 +0900 Message-Id: <9501130151.AA18255@ns.trl.ibm.com> To: freebsd-hackers@FreeBSD.org Subject: Re: Small syscons change Reply-To: moriyama@trl.ibm.co.jp In-Reply-To: Your message of "Thu, 12 Jan 1995 10:32:10 -0500 (EST)" References: <199501121532.KAA02843@skynet.ctr.columbia.edu> X-Mailer: Mew beta version 0.77+ on Emacs 19.28.1, Mule 2.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Fri, 13 Jan 1995 10:51:55 +0900 From: MORIYAMA Takao Sender: hackers-owner@FreeBSD.org Precedence: bulk Hi, all. I'm new to FreeBSD and running FreeBSD 2.0-RELEASE on ThinkPad-750C. >>>>> "WRE" == Wankle Rotary Engine writes: WRE> After some discussion with Bruce Evans, I've decided to submit the WRE> following tiny patch for /sys/i386/isa/syscons.c: I've also made a fix for syscons.c. I first made the same fix as Wankle's but another problem arose in column or row only cursor movement. If termcap library generates "ESC [ d" or "ESC [ `" sequences, is 0 based, not 1 based. So clamping by original code n = scp->term.param[0]; if (n < 1) n = 1; makes the cursor on the second column/row on the screen. This sequnce is used by emacs as long as I know. The following pactch fixes this problem without breaking bash and elvis. I don't know this is the right solution, but I have no problem for now. Thanks. ----------------------- CUT HERE ----------------------- --- syscons.c.DIST Wed Jan 11 15:19:30 1995 +++ syscons.c Wed Jan 11 15:20:52 1995 @@ -1856,7 +1856,7 @@ break; case '`': /* move cursor to column n */ - n = scp->term.param[0]; if (n < 1) n = 1; + n = scp->term.param[0]; move_crsr(scp, n, scp->ypos); break; @@ -1866,7 +1866,12 @@ break; p case 'd': /* move cursor to row n */ - n = scp->term.param[0]; if (n < 1) n = 1; + /* If cursor is next to the right most column, + * force to the left most position. + */ + if (scp->xpos == scp->xsize) + scp->xpos = 0; + n = scp->term.param[0]; move_crsr(scp, scp->xpos, n); break; ----------------------- CUT HERE ----------------------- -- Takao Moriyama Internet: moriyama@vnet.ibm.com IBM Japan, Tokyo Research Laboratory JUNET: moriyama@trl.ibm.co.jp Advanced Graphics Systems IBM IP-net: moriyama@trl.ibm.com Voice: +81-462-73-4927 IBM VNET: MORIYAMA at TRLVM IBMMAIL: JPIBMRS8 at IBMMAIL