summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--catgirl.16
-rw-r--r--ui.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/catgirl.1 b/catgirl.1
index d572a8b..03b708e 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -1,4 +1,4 @@
-.Dd January 26, 2021
+.Dd February  3, 2021
 .Dt CATGIRL 1
 .Os
 .
@@ -658,7 +658,9 @@ Scroll up a page.
 .El
 .
 .Ss IRC Formatting
-.Bl -tag -width Ds -compact
+.Bl -tag -width "C-z C-v" -compact
+.It Ic C-z C-v
+Insert the next input character literally.
 .It Ic C-z b
 Toggle bold.
 .It Ic C-z c
diff --git a/ui.c b/ui.c
index e75e0eb..557d0dc 100644
--- a/ui.c
+++ b/ui.c
@@ -1003,19 +1003,22 @@ void uiRead(void) {
 	}
 
 	wint_t ch;
-	static bool paste, style;
+	static bool paste, style, literal;
 	for (int ret; ERR != (ret = wget_wch(input, &ch));) {
 		if (ret == KEY_CODE_YES && ch == KeyPasteOn) {
 			paste = true;
 		} else if (ret == KEY_CODE_YES && ch == KeyPasteOff) {
 			paste = false;
-		} else if (paste) {
+		} else if (paste || literal) {
 			edit(windows.ptrs[windows.show]->id, EditInsert, ch);
 		} else if (ret == KEY_CODE_YES) {
 			keyCode(ch);
 		} else if (ch == (L'Z' ^ L'@')) {
 			style = true;
 			continue;
+		} else if (style && ch == (L'V' ^ L'@')) {
+			literal = true;
+			continue;
 		} else if (style) {
 			keyStyle(ch);
 		} else if (iswcntrl(ch)) {
@@ -1024,6 +1027,7 @@ void uiRead(void) {
 			edit(windows.ptrs[windows.show]->id, EditInsert, ch);
 		}
 		style = false;
+		literal = false;
 	}
 	inputUpdate();
 }