Date: Fri, 13 Jan 1995 10:51:55 +0900 From: MORIYAMA Takao <moriyama@trl.ibm.co.jp> To: freebsd-hackers@FreeBSD.org Subject: Re: Small syscons change Message-ID: <9501130151.AA18255@ns.trl.ibm.com> In-Reply-To: Your message of "Thu, 12 Jan 1995 10:32:10 -0500 (EST)" References: <199501121532.KAA02843@skynet.ctr.columbia.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, all. I'm new to FreeBSD and running FreeBSD 2.0-RELEASE on
ThinkPad-750C.
>>>>> "WRE" == Wankle Rotary Engine <wpaul@skynet.ctr.columbia.edu> 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 [ <nnn> d" or "ESC [ <nnn> `"
sequences, <nnn> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9501130151.AA18255>
