diff options
| author | ryanss | 2015-04-01 23:59:00 -0400 |
|---|---|---|
| committer | ryanss | 2015-04-01 23:59:00 -0400 |
| commit | ccd86bd928b730922b9a289a80d1f53b4bf7d8d4 (patch) | |
| tree | 05dadd3faa48d1c04c94ca40c030cd968e141b5a /ftplugin | |
| parent | b515dc0565b4435936c30105dc53701d2da9bd6c (diff) | |
| download | vim-hn-ccd86bd928b730922b9a289a80d1f53b4bf7d8d4.tar.gz | |
Show item url on comment page when not HN item
Diffstat (limited to 'ftplugin')
| -rw-r--r-- | ftplugin/hackernews.py | 4 |
1 files changed, 3 insertions, 1 deletions
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("") |
