git: 9front

Download patch

ref: 68165901439ba484638ca76a41b32611a2e0720a
parent: 336ad60a80a72fc9ce6ca9d1e69e3144815cb94a
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Aug 4 02:45:58 EDT 2013

rio: add ^B control sequence to move cursor to output point

--- a/sys/include/keyboard.h
+++ b/sys/include/keyboard.h
@@ -45,6 +45,8 @@
 	Kscrollonedown=	KF|0x21,
 
 	Ksoh=	0x01,
+	Kstx=	0x02,
+	Ketx=	0x03,
 	Keof=	0x04,
 	Kenq=	0x05,
 	Kack=	0x06,
--- a/sys/man/1/rio
+++ b/sys/man/1/rio
@@ -391,7 +391,8 @@
 .PP
 Typing a left or right arrow moves the cursor one character in that direction.
 Typing an SOH character (control-A) moves the cursor to the beginning of the
-current line; an ENQ character (control-E) moves to the end.
+current line; an ENQ character (control-E) moves to the end. The STX character
+(control-B) moves the cursor to the output point.
 .PP
 Text may be moved vertically within the window.
 A scroll bar on the left of the window shows in its clear portion what fragment of the
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -691,6 +691,10 @@
 			wsetselect(w, q0, q0);
 			wshow(w, w->q0);
 			return;
+		case Kstx:	/* ^B: output point */
+			wsetselect(w, w->qh, w->qh);
+			wshow(w, w->q0);
+			return;
 		}
 	if(w->rawing && (w->q0==w->nr || w->mouseopen)){
 		waddraw(w, &r, 1);
--