rio: add ^B control sequence to move cursor to output point
This commit is contained in:
parent
a269ced358
commit
24349c52b4
|
@ -45,6 +45,8 @@ enum {
|
||||||
Kscrollonedown= KF|0x21,
|
Kscrollonedown= KF|0x21,
|
||||||
|
|
||||||
Ksoh= 0x01,
|
Ksoh= 0x01,
|
||||||
|
Kstx= 0x02,
|
||||||
|
Ketx= 0x03,
|
||||||
Keof= 0x04,
|
Keof= 0x04,
|
||||||
Kenq= 0x05,
|
Kenq= 0x05,
|
||||||
Kack= 0x06,
|
Kack= 0x06,
|
||||||
|
|
|
@ -391,7 +391,8 @@ for the preceding string (see
|
||||||
.PP
|
.PP
|
||||||
Typing a left or right arrow moves the cursor one character in that direction.
|
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
|
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
|
.PP
|
||||||
Text may be moved vertically within the window.
|
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 scroll bar on the left of the window shows in its clear portion what fragment of the
|
||||||
|
|
|
@ -691,6 +691,10 @@ wkeyctl(Window *w, Rune r)
|
||||||
wsetselect(w, q0, q0);
|
wsetselect(w, q0, q0);
|
||||||
wshow(w, w->q0);
|
wshow(w, w->q0);
|
||||||
return;
|
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)){
|
if(w->rawing && (w->q0==w->nr || w->mouseopen)){
|
||||||
waddraw(w, &r, 1);
|
waddraw(w, &r, 1);
|
||||||
|
|
Loading…
Reference in a new issue