about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--catgirl.14
-rw-r--r--ui.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/catgirl.1 b/catgirl.1
index 03b708e..0543be3 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -1,4 +1,4 @@
-.Dd February  3, 2021
+.Dd February 15, 2021
 .Dt CATGIRL 1
 .Os
 .
@@ -669,6 +669,8 @@ Set or reset color.
 Toggle italics.
 .It Ic C-z o
 Reset formatting.
+.It Ic C-z p
+Manually toggle paste mode.
 .It Ic C-z r
 Toggle reverse color.
 .It Ic C-z u
diff --git a/ui.c b/ui.c
index f1d784a..3c6c4ed 100644
--- a/ui.c
+++ b/ui.c
@@ -211,7 +211,8 @@ static short colorPair(short fg, short bg) {
 	X(KeyFocusIn, "\33[I", NULL) \
 	X(KeyFocusOut, "\33[O", NULL) \
 	X(KeyPasteOn, "\33[200~", NULL) \
-	X(KeyPasteOff, "\33[201~", NULL)
+	X(KeyPasteOff, "\33[201~", NULL) \
+	X(KeyPasteManual, "\32p", "\32\20")
 
 enum {
 	KeyMax = KEY_MAX,
@@ -1007,6 +1008,8 @@ void uiRead(void) {
 			paste = true;
 		} else if (ret == KEY_CODE_YES && ch == KeyPasteOff) {
 			paste = false;
+		} else if (ret == KEY_CODE_YES && ch == KeyPasteManual) {
+			paste ^= true;
 		} else if (paste || literal) {
 			edit(windows.ptrs[windows.show]->id, EditInsert, ch);
 		} else if (ret == KEY_CODE_YES) {