about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-07 14:09:29 -0400
committerJune McEnroe <june@causal.agency>2020-04-07 14:09:29 -0400
commit9bc52d7238b81531f5f796c9f90b15e0405db34e (patch)
tree7b11cc943c265a4bd97be033dfa8f29b61213218
parentRevert "Add C-o as alias of M-/" (diff)
downloadcatgirl-9bc52d7238b81531f5f796c9f90b15e0405db34e.tar.gz
catgirl-9bc52d7238b81531f5f796c9f90b15e0405db34e.zip
Add M-< and M-> for scroll to top and bottom
Mirrored by S-Home and S-End but I guess I'm not documenting those...
Diffstat (limited to '')
-rw-r--r--catgirl.14
-rw-r--r--ui.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/catgirl.1 b/catgirl.1
index 623c314..37bf4a0 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -449,6 +449,10 @@ Scroll down a page.
 Toggle visibility of filtered messages.
 .It Ic M-/
 Switch to previously selected window.
+.It Ic M-<
+Scroll to top.
+.It Ic M->
+Scroll to bottom.
 .It Ic M-a
 Cycle through unread windows.
 .It Ic M-l
diff --git a/ui.c b/ui.c
index 1ff34fd..903149d 100644
--- a/ui.c
+++ b/ui.c
@@ -215,6 +215,8 @@ static short colorPair(short fg, short bg) {
 	X(KeyMetaU, "\33u", NULL) \
 	X(KeyMetaV, "\33v", NULL) \
 	X(KeyMetaEnter, "\33\r", "\33\n") \
+	X(KeyMetaGt, "\33>", "\33.") \
+	X(KeyMetaLt, "\33<", "\33,") \
 	X(KeyMetaMinus, "\33-", "\33_") \
 	X(KeyMetaSlash, "\33/", NULL) \
 	X(KeyFocusIn, "\33[I", NULL) \
@@ -904,6 +906,9 @@ static void keyCode(int code) {
 		break; case KeyMetaMinus: window->ignore ^= true; reflow(window);
 		break; case KeyMetaSlash: windowShow(windows.swap);
 
+		break; case KeyMetaGt: windowScroll(window, -WindowLines);
+		break; case KeyMetaLt: windowScroll(window, +WindowLines);
+
 		break; case KeyMeta0 ... KeyMeta9: uiShowNum(code - KeyMeta0);
 		break; case KeyMetaA: showAuto();
 		break; case KeyMetaB: edit(id, EditPrevWord, 0);
@@ -925,6 +930,8 @@ static void keyCode(int code) {
 		break; case KEY_NPAGE: windowScroll(window, -(PAGE_LINES - 2));
 		break; case KEY_PPAGE: windowScroll(window, +(PAGE_LINES - 2));
 		break; case KEY_RIGHT: edit(id, EditNext, 0);
+		break; case KEY_SEND: windowScroll(window, -WindowLines);
+		break; case KEY_SHOME: windowScroll(window, +WindowLines);
 		break; case KEY_UP: windowScroll(window, +1);
 	}
 }
href='/cgit-pink/commit/ui-tree.c?h=1.3.0&id=46b7abed99e957008c01c02cf612aa526ba92f04&follow=1'>ui-tree: add support for source-filter optionLars Hjemli 2009-07-31ui-snapshot: use cgit_{open|close}_filter() to execute compressorsLars Hjemli 2009-07-31Add generic filter/plugin infrastructureLars Hjemli 2009-07-25Add support for mime type registration and lookupLars Hjemli 2009-07-25cgit.h: keep config flags sortedLars Hjemli 2009-07-25cgitrc.5.txt: document 'embedded' and 'noheader'Lars Hjemli 2009-07-25Add support for 'noheader' optionLars Hjemli 2009-07-25cgitrc.5.txt: document 'head-include'Lars Hjemli 2009-07-25ui-blob: return 'application/octet-stream' for binary blobsLars Hjemli 2009-07-25ui-plain: Return 'application/octet-stream' for binary files.Remko Tronçon 2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro 2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli 2009-06-07Add head-include configuration option.Mark Lodato 2009-03-15CGIT 0.8.2.1Lars Hjemli 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli 2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli