summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/ui.c b/ui.c
index 5f26405..72ff0f4 100644
--- a/ui.c
+++ b/ui.c
@@ -358,17 +358,23 @@ void uiFmt(struct Tag tag, const wchar_t *format, ...) {
 	free(wcs);
 }
 
-static void logPageUp(void) {
+static void logScrollUp(int lines) {
 	int height = logHeight(ui.view);
 	if (ui.view->scroll == height) return;
 	if (ui.view->scroll == LOG_LINES) ui.view->mark = true;
-	ui.view->scroll = MAX(ui.view->scroll - height / 2, height);
+	ui.view->scroll = MAX(ui.view->scroll - lines, height);
 }
-static void logPageDown(void) {
+static void logScrollDown(int lines) {
 	if (ui.view->scroll == LOG_LINES) return;
-	ui.view->scroll = MIN(ui.view->scroll + logHeight(ui.view) / 2, LOG_LINES);
+	ui.view->scroll = MIN(ui.view->scroll + lines, LOG_LINES);
 	if (ui.view->scroll == LOG_LINES) ui.view->mark = false;
 }
+static void logPageUp(void) {
+	logScrollUp(logHeight(ui.view) / 2);
+}
+static void logPageDown(void) {
+	logScrollDown(logHeight(ui.view) / 2);
+}
 
 static bool keyChar(wchar_t ch) {
 	if (iswascii(ch)) {
@@ -439,6 +445,8 @@ static bool keyChar(wchar_t ch) {
 static bool keyCode(wchar_t ch) {
 	switch (ch) {
 		break; case KEY_RESIZE:    uiResize(); return false;
+		break; case KEY_SLEFT:     logScrollUp(1); return false;
+		break; case KEY_SRIGHT:    logScrollDown(1); return false;
 		break; case KEY_PPAGE:     logPageUp(); return false;
 		break; case KEY_NPAGE:     logPageDown(); return false;
 		break; case KEY_LEFT:      edit(ui.view->tag, EDIT_LEFT, 0);
- OpenBSD::BaseState(3p) - packages(7) - adduser(8) - afterboot(8) - user(8) - useradd(8) - userdel(8) - userinfo(8) - usermod(8) This patch adds baseXX.tgz to the OpenBSD distfiles, which begrudgingly adds ~330 MiB to the install. I figure this might acceptable since base.txz is similarly fetched for FreeBSD. Since this isn't ideal, I'll look into whether these man pages are intended to be in baseXX.tgz or not. If not, I'll see about changing this upstream, and this patch can be reverted. [1] Lines 2876-2931: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/distrib/sets/lists/base/mi?annotate=1.1065 2022-05-08Update to OpenBSD 7.1 2062.73June McEnroe 2021-10-15Update to OpenBSD 7.0 2062.63June McEnroe 2021-08-29Update to Linux man-pages 5.13 2062.53Štěpán Němec 2021-08-26Update to NetBSD 9.2 2062.52June McEnroe 2021-08-26Support DESTDIR in install/uninstallJune McEnroe 2021-08-26Add version number generatorJune McEnroe 2021-08-22Add ISC license headerJune McEnroe 2021-08-22Update to Linux man-pages 5.12Štěpán Němec 2021-06-21Add manuals for macOS 11.3June McEnroe 2021-05-08Update to OpenBSD 6.9June McEnroe 2021-04-26Update to Linux man-pages 5.11June McEnroe 2021-04-26Update to FreeBSD 13.0June McEnroe 2021-01-27Completely rewrite how manuals are fetched and installedJune McEnroe Also add section 6 manuals from NetBSD and OpenBSD! 2020-12-14Update to man-pages-posix 2017-aJune McEnroe 2020-12-14Update to OpenBSD 6.8June McEnroe 2020-12-14Update to NetBSD 9.1June McEnroe 2020-12-14Update to man-pages 5.09June McEnroe 2020-12-14Update to FreeBSD 12.2June McEnroe 2020-06-08Update to OpenBSD 6.7June McEnroe 2020-05-04Add hack for macOS to search extra man sectionsJune McEnroe 2020-05-04Don't clear MANSECTJune McEnroe