vnews 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/vnews.vim +7 -4
  2. data/lib/vnews/version.rb +1 -1
  3. metadata +2 -2
data/lib/vnews.vim CHANGED
@@ -50,6 +50,7 @@ function! s:common_mappings()
50
50
  nnoremap <buffer> <leader>u :call <SID>update_feed()<CR>
51
51
  nnoremap <silent> <leader>? :call <SID>show_help()<cr>
52
52
  command! -bar -nargs=0 VNUpdateFeed :call <SID>update_feed()
53
+ command! -bar -nargs=1 VNSearch :call s:search_items(<f-args>)
53
54
  endfunc
54
55
 
55
56
  function! s:create_list_window()
@@ -433,9 +434,13 @@ func! s:search_items(term)
433
434
  " show item for top match
434
435
  normal gg
435
436
  call s:show_item_under_cursor(0)
436
- call matchadd("VnewsSearchTerm", '\c' . a:term )
437
+ for word in split(a:term, '\s\+')
438
+ call matchadd("VnewsSearchTerm", '\c' . word)
439
+ endfor
437
440
  call s:focus_window(s:listbufnr)
438
- call matchadd("VnewsSearchTerm", '\c' . a:term )
441
+ for word in split(a:term, '\s\+')
442
+ call matchadd("VnewsSearchTerm", '\c' . word)
443
+ endfor
439
444
  endfunc
440
445
 
441
446
  "------------------------------------------------------------------------
@@ -468,8 +473,6 @@ func! s:show_help()
468
473
  call system(command)
469
474
  endfunc
470
475
 
471
- command! -bar -nargs=1 VNSearch :call s:search_items(<f-args>)
472
-
473
476
 
474
477
  call s:create_list_window()
475
478
  call s:create_item_window()
data/lib/vnews/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Vnews
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
4
4
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi