Make malformed lines less prominent, make them not a link - holymoly - A tor enabled gopher client written in CHICKEN scheme
(HTM) git clone git://vernunftzentrum.de/holymoly.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 2846889ec0da55f718c2eb87f972af801fe50c37
(DIR) parent db9345443c5ab1542db7760a71503d69e160ab0b
(HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
Date: Fri, 3 Aug 2018 09:48:21 +0200
Make malformed lines less prominent, make them not a link
Diffstat:
holymoly.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/holymoly.scm b/holymoly.scm
@@ -224,14 +224,14 @@
(port (string->number (fourth s)))
(rest (cdddr s)))
(make-entry type title selector host port rest))
- (e () (make-entry 'error "Malformed entry, please ignore" "" "" "" '()))))
+ (e () (make-entry 'error "..." "" "" "" '()))))
(define (render-entry e)
(match (entry-type e)
('info
(sprintf " ~a" (entry-title e)))
('error
- (sprintf "[ERROR]:\t~a" (entry-title e)))
+ (sprintf " ! ~a" (entry-title e)))
(else
(sprintf " > ~a" (entry-title e)))))
@@ -261,7 +261,9 @@
(define (render-directory strs)
(let* ((p (map string->entry strs))
- (links (get-indices p (lambda (e) (not (equal? (entry-type e) 'info))))))
+ (links (get-indices p (lambda (e)
+ (not (or (equal? (entry-type e) 'info)
+ (equal? (entry-type e) 'error)))))))
(pager p win: (main-win) renderer: render-entry use-cursor: (not (null? links)) selectables: links)))
(define type-handlers