Add M-a
parent
26eefa35c9
commit
16316679a1
|
@ -246,6 +246,8 @@ Redraw the UI.
|
||||||
Switch to next window.
|
Switch to next window.
|
||||||
.It Ic C-p
|
.It Ic C-p
|
||||||
Switch to previous window.
|
Switch to previous window.
|
||||||
|
.It Ic M-a
|
||||||
|
Cycle through unread windows.
|
||||||
.It Ic M-m
|
.It Ic M-m
|
||||||
Insert a blank line in the window.
|
Insert a blank line in the window.
|
||||||
.It Ic M- Ns Ar n
|
.It Ic M- Ns Ar n
|
||||||
|
|
25
ui.c
25
ui.c
|
@ -194,6 +194,7 @@ static void errExit(void) {
|
||||||
X(KeyMeta7, "\0337") \
|
X(KeyMeta7, "\0337") \
|
||||||
X(KeyMeta8, "\0338") \
|
X(KeyMeta8, "\0338") \
|
||||||
X(KeyMeta9, "\0339") \
|
X(KeyMeta9, "\0339") \
|
||||||
|
X(KeyMetaA, "\33a") \
|
||||||
X(KeyMetaB, "\33b") \
|
X(KeyMetaB, "\33b") \
|
||||||
X(KeyMetaD, "\33d") \
|
X(KeyMetaD, "\33d") \
|
||||||
X(KeyMetaF, "\33f") \
|
X(KeyMetaF, "\33f") \
|
||||||
|
@ -619,6 +620,29 @@ void uiCloseNum(size_t num) {
|
||||||
windowClose(window);
|
windowClose(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void showAuto(void) {
|
||||||
|
static bool origin;
|
||||||
|
if (!origin) {
|
||||||
|
windows.other = windows.active;
|
||||||
|
origin = true;
|
||||||
|
}
|
||||||
|
struct Window *other = windows.other;
|
||||||
|
for (struct Window *window = windows.head; window; window = window->next) {
|
||||||
|
if (window->heat < Hot) continue;
|
||||||
|
windowShow(window);
|
||||||
|
windows.other = other;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (struct Window *window = windows.head; window; window = window->next) {
|
||||||
|
if (window->heat < Warm) continue;
|
||||||
|
windowShow(window);
|
||||||
|
windows.other = other;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
windowShow(windows.other);
|
||||||
|
origin = false;
|
||||||
|
}
|
||||||
|
|
||||||
static void keyCode(int code) {
|
static void keyCode(int code) {
|
||||||
size_t id = windows.active->id;
|
size_t id = windows.active->id;
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
@ -628,6 +652,7 @@ static void keyCode(int code) {
|
||||||
break; case KeyPasteOn:; // TODO
|
break; case KeyPasteOn:; // TODO
|
||||||
break; case KeyPasteOff:; // TODO
|
break; case KeyPasteOff:; // TODO
|
||||||
|
|
||||||
|
break; case KeyMetaA: showAuto();
|
||||||
break; case KeyMetaB: edit(id, EditPrevWord, 0);
|
break; case KeyMetaB: edit(id, EditPrevWord, 0);
|
||||||
break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
|
break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
|
||||||
break; case KeyMetaF: edit(id, EditNextWord, 0);
|
break; case KeyMetaF: edit(id, EditNextWord, 0);
|
||||||
|
|
Loading…
Reference in New Issue