summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-08-04 06:45:58 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-08-04 06:45:58 +0200
commit24349c52b4fc930d183cf4ec4d7f4b6275e7cb0d (patch)
tree689543a2aa54267209608187012cc5da379e1c60 /sys
parenta269ced358a6c79708a41c42ae1978599fb5634a (diff)
rio: add ^B control sequence to move cursor to output point
Diffstat (limited to 'sys')
-rw-r--r--sys/include/keyboard.h2
-rw-r--r--sys/man/1/rio3
-rw-r--r--sys/src/cmd/rio/wind.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/sys/include/keyboard.h b/sys/include/keyboard.h
index c3aff395d..a9539a1a3 100644
--- a/sys/include/keyboard.h
+++ b/sys/include/keyboard.h
@@ -45,6 +45,8 @@ enum {
Kscrollonedown= KF|0x21,
Ksoh= 0x01,
+ Kstx= 0x02,
+ Ketx= 0x03,
Keof= 0x04,
Kenq= 0x05,
Kack= 0x06,
diff --git a/sys/man/1/rio b/sys/man/1/rio
index bf225bf13..4426d15ef 100644
--- a/sys/man/1/rio
+++ b/sys/man/1/rio
@@ -391,7 +391,8 @@ for the preceding string (see
.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
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index d8c47d4cb..fc9a1176d 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -691,6 +691,10 @@ wkeyctl(Window *w, Rune r)
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);