diff options
| author | ryanss | 2015-04-04 23:59:00 -0400 |
|---|---|---|
| committer | ryanss | 2015-04-04 23:59:00 -0400 |
| commit | 055445cf43b379d713e0a2b1a4704605cfd5f661 (patch) | |
| tree | fe2a343d5a2251e2078cd47d671171ae890992c6 /plugin | |
| parent | 704f5a5970b8bd7b346d49cd66cbf132e3870610 (diff) | |
| download | vim-hn-055445cf43b379d713e0a2b1a4704605cfd5f661.tar.gz | |
Open different story lists in different buffers
Before this change trying to open a second, different story list using
the optional HackerNews command arugment would not do anything if a
.hackernews buffer was already open.
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/hackernews.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim index d6dafdc..1d9389a 100644 --- a/plugin/hackernews.vim +++ b/plugin/hackernews.vim @@ -34,13 +34,16 @@ function! HackerNews(...) \'jobs', 'best', 'active', 'noobstories'] if index(available_lists, a:1) >= 0 let g:hackernews_stories = a:1 + let stories = a:1 else let g:hackernews_stories = 'news' + let stories = '' end else let g:hackernews_stories = 'news' + let stories = '' end - edit .hackernews + execute "edit " . stories . ".hackernews" normal! gg endfunction |
