diff options
| author | ryanss | 2015-01-16 23:59:00 -0500 |
|---|---|---|
| committer | ryanss | 2015-01-16 23:59:00 -0500 |
| commit | bcf626d95fe5fdffaa9476952339d4cbdc881d8d (patch) | |
| tree | 42fc789320f1b7a8bde2fd452fee0f40ebf226ed /plugin | |
| parent | e2cc7e574015186e550847a47fd21fe255ec7fd3 (diff) | |
| download | vim-hn-bcf626d95fe5fdffaa9476952339d4cbdc881d8d.tar.gz | |
Wrap article url to 80 char width
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/hackernews.py | 3 |
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) |
