From ccd86bd928b730922b9a289a80d1f53b4bf7d8d4 Mon Sep 17 00:00:00 2001 From: ryanss Date: Wed, 1 Apr 2015 23:59:00 -0400 Subject: Show item url on comment page when not HN item --- ftplugin/hackernews.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ftplugin') diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index 4f08a47..f6fd974 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -187,7 +187,9 @@ def link(external=False): item['comments_count'])) else: bwrite(item['time_ago']) - if 'url' in item: + if 'url' in item and item['url'].find(item_id) < 0: + bwrite("[%s]" % item['url']) + else: bwrite("[http://news.ycombinator.com/item?id=%s]" % item_id) if 'content' in item: bwrite("") -- cgit v1.2.3