Permalink
Browse files

Version 0.4: Fix bug with rdoc "multiple match" cWORD.

  • Loading branch information...
1 parent ab719a3 commit c6bd988b8468ea9877b5b4aba0a538852a565790 @mahlonsmith mahlonsmith committed with vim-scripts Jul 29, 2008
Showing with 5 additions and 4 deletions.
  1. +5 −4 plugin/specky.vim
View
@@ -2,7 +2,7 @@
"
" Specky!
" Mahlon E. Smith <mahlon@martini.nu>
-" $Id: specky.vim 88 2008-07-29 22:33:47Z mahlon $
+" $Id: specky.vim 89 2008-07-29 23:12:11Z mahlon $
"
" Some documentation {{{
"
@@ -167,7 +167,7 @@ endif
if exists( 'specky_loaded' )
finish
endif
-let specky_loaded = '$Rev: 88 $'
+let specky_loaded = '$Rev: 89 $'
"}}}
@@ -370,13 +370,11 @@ function! <SID>RunRdoc()
" something like Kernel#require.
"
let l:word = expand('<cWORD>')
- echo l:word
else
" Not in the rdoc buffer. This allows us to lookup
" something like 'each' in some_hash.each { ... }
"
let l:word = expand('<cword>')
- echo l:word
endif
" Squash the old buffer, if it exists.
@@ -385,6 +383,9 @@ function! <SID>RunRdoc()
execute 'bd! ' . l:buf
endif
+ " With multiple matches, strip the comams from the cWORD.
+ let l:word = substitute( l:word, ',', '', 'eg' )
+
execute ( exists('g:speckyVertSplit') ? 'vert new ' : 'new ') . l:buf
execute 'setlocal buftype=nofile bufhidden=delete noswapfile filetype=rdoc'
execute 'nnoremap <silent> <buffer> q :close<CR>'

0 comments on commit c6bd988

Please sign in to comment.