Commits

Takeshi NISHIDA committed 672cfc1

minor improvement for Coverage-File mode

  • Participants
  • Parent commits e0fbc42
  • Tags 4.2.1

Comments (0)

Files changed (1)

File autoload/fuf/coveragefile.vim

 "
 function fuf#coveragefile#onInit()
   call fuf#defineLaunchCommand('FufCoverageFile', s:MODE_NAME, '""', [])
+  call l9#defineVariableDefault('g:fuf_coveragefile_name', '') " private option
   command! -bang -narg=0        FufCoverageFileRegister call s:registerCoverage()
   command! -bang -narg=?        FufCoverageFileChange call s:changeCoverage(<q-args>)
 endfunction
       call fuf#echoError('Coverage not found: ' . name)
     return
   endif
-  call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns',
-        \                       coverages[0].patterns])
+  call fuf#setOneTimeVariables(
+        \   ['g:fuf_coveragefile_globPatterns', coverages[0].patterns],
+        \   ['g:fuf_coveragefile_name'        , a:name]
+        \ )
   FufCoverageFile
 endfunction
 
 
 "
 function s:handler.getPrompt()
+  let nameString = (empty(g:fuf_coveragefile_name) ? ''
+        \           : '[' . g:fuf_coveragefile_name . ']')
   return fuf#formatPrompt(g:fuf_coveragefile_prompt, self.partialMatching,
-        \                 string(g:fuf_coveragefile_globPatterns))
+        \                 nameString)
 endfunction
 
 "