commit 88adfad8f9b483cc1d9528ece8d4bc30016f2fe3
parent 0b48a8c3a436e7627db9c704c4bfb290d9a3b30d
Author: Rob King <deadpixi@users.noreply.github.com>
Date: Sun, 21 Aug 2022 21:49:32 -0500
Merge pull request #66 from equwal/escapeartist
Add a bailout keybinding
Diffstat:
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -57,6 +57,9 @@
/* The delete terminal key. */
#define DELETE_NODE KEY(L'w')
+/* does nothing, specifically */
+#define BAILOUT KEY(L'c')
+
/* The force redraw key. */
#define REDRAW KEY(L'l')
@@ -193,3 +196,4 @@ static wchar_t CSET_GRAPH[] ={ /* Graphics Set One */
};
#endif
+
diff --git a/mtm.1 b/mtm.1
@@ -74,6 +74,8 @@ when prefixed with the command character:
.Bl -tag -width Ds
.It Em "Up/Down/Right/Left Arrow"
Select the terminal above/below/to the right of/to the left of the currently focused one.
+.It Em "c"
+Abandon the keychord sequence.
.It Em "o"
.Pq "the letter oh"
Switch to the last-focused terminal.
diff --git a/mtm.c b/mtm.c
@@ -894,6 +894,12 @@ deletenode(NODE *n) /* Delete a node. */
}
static void
+bailout(void) /* nothing to do */
+{
+ ;
+}
+
+static void
reshapeview(NODE *n, int d, int ow) /* Reshape a view. */
{
int oy, ox;
@@ -1101,6 +1107,7 @@ handlechar(int r, int k) /* Handle a single input character. */
DO(true, HSPLIT, split(n, HORIZONTAL))
DO(true, VSPLIT, split(n, VERTICAL))
DO(true, DELETE_NODE, deletenode(n))
+ DO(true, BAILOUT, bailout())
DO(true, REDRAW, touchwin(stdscr); draw(root); redrawwin(stdscr))
DO(true, SCROLLUP, scrollback(n))
DO(true, SCROLLDOWN, scrollforward(n))
@@ -1171,3 +1178,4 @@ main(int argc, char **argv)
quit(EXIT_SUCCESS, NULL);
return EXIT_SUCCESS; /* not reached */
}
+