From 5712aafb874ce19b38881ddb4a0e158f6741dae5 Mon Sep 17 00:00:00 2001 From: ryanss Date: Mon, 16 Feb 2015 10:57:55 -0500 Subject: Front page title line now links to item url. Close #4 The first line of of each front page item (that contains the title and domain) links to the external url associated with the item. The second line of each item (that contains the points, user, comment count) links to the comments page. This is consistent with how the actual Hacker News front page works. --- ftplugin/hackernews.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftplugin/hackernews.py') diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index 2c7fd2a..8480979 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -69,9 +69,9 @@ def main(): if 'title' not in item: continue if 'domain' in item: - line = "%s%d. %s (%s) [%d]" + line = "%s%d. %s (%s) [%s]%s" line %= (" " if i+1 < 10 else "", i+1, item['title'], - item['domain'], item['id']) + item['domain'], item['url'], unichr(160)) bwrite(line) else: line = "%s%d. %s [%d]" -- cgit v1.2.3