summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorryanss2015-01-16 23:59:00 -0500
committerryanss2015-01-16 23:59:00 -0500
commitbcf626d95fe5fdffaa9476952339d4cbdc881d8d (patch)
tree42fc789320f1b7a8bde2fd452fee0f40ebf226ed /plugin
parente2cc7e574015186e550847a47fd21fe255ec7fd3 (diff)
downloadvim-hn-bcf626d95fe5fdffaa9476952339d4cbdc881d8d.tar.gz
Wrap article url to 80 char width
Diffstat (limited to 'plugin')
-rw-r--r--plugin/hackernews.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/hackernews.py b/plugin/hackernews.py
index 357f6fd..ac680c0 100644
--- a/plugin/hackernews.py
+++ b/plugin/hackernews.py
@@ -41,7 +41,8 @@ def hacker_news_link():
b[0] = item['title']
b.append("Posted %s by %s" % (item['time_ago'], item['user']))
b.append("%d Points / %d Comments" % (item['points'], item['comments_count']))
- b.append("[%s]" % item['url'])
+ for i, wrap in enumerate(textwrap.wrap("[%s]" % item['url'], width=80)):
+ b.append(wrap)
b.append("")
b.append("")
print_comments(item['comments'], b)