From 589a6837387b16178942ca52e5cd7ebace8730a2 Mon Sep 17 00:00:00 2001 From: dvkt Date: Thu, 19 Dec 2019 20:23:38 -0800 Subject: [PATCH] tweak types help --- src/help.rs | 39 ++++++++++++++++++--------------------- src/menu.rs | 10 ++++++++++ 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/help.rs b/src/help.rs index 18e2671..42fe196 100644 --- a/src/help.rs +++ b/src/help.rs @@ -20,8 +20,8 @@ i i~ the quick lil gopher client ~ i 7search gopher /v2/vs gopher.floodgap.com -i 1welcome to gopherspace /gopher gopher.floodgap.com +1the gopher project / gopherproject.org 1gopher lawn /lawn bitreich.org i i ~ * ~ @@ -122,31 +122,28 @@ i ** gopher types ** i iphetch supports these links: i -0text files -1menu items -3errors -hexternal URLs -7search servers -8telnet launching +0text files /types help +1menu items /types help +3errors /types help +7search servers /types help +8telnet links /types help +hexternal URLs /types help i iand these download types: i -4binhex -5dosfiles -6uuencoded files -9binaries -gGIFs -Iimages downloads -ssound files -ddocuments +4binhex /types help +5dosfiles /types help +6uuencoded files /types help +9binaries /types help +gGIFs /types help +Iimages downloads /types help +ssound files /types help +ddocuments /types help i iphetch does not support: i -2CSO Entries -+Mirrors -TTelnet3270 +2CSO Entries /types help ++Mirrors /types help +TTelnet3270 /types help i -hGopher is RFC 1436 -hGopher is RFC 1436 /html/rfc1436 help -i https://tools.ietf.org/html/rfc1436 "; diff --git a/src/menu.rs b/src/menu.rs index fbd6efd..366b837 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -148,6 +148,8 @@ impl Menu { Type::Info => push!("93", name), Type::HTML => push!("92", name), Type::Error => push!("91", name), + Type::Telnet => push!("4;97;90", name), + Type::Telnet3270 | Type::Mirror | Type::CSOEntity => push!("107;30", name), typ if typ.is_download() => push!("4;97", name), _ => push!("0", name), } @@ -175,6 +177,14 @@ impl Menu { fn action_page_down(&mut self) -> Action { let lines = self.lines.len(); + if lines < self.size.1 { + if self.links.len() > 0 { + self.link = self.links.len() - 1; + return Action::Redraw; + } + return Action::None; + } + if lines > SCROLL_LINES && self.scroll < lines - SCROLL_LINES { self.scroll += SCROLL_LINES; if let Some(dir) = self.link_visibility(self.link) {