Skip to content

Commit

Permalink
Write default files to the buffer by default
Browse files Browse the repository at this point in the history
  • Loading branch information
westoque committed Apr 8, 2011
1 parent 79f4efd commit c23eaca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions molly.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function! s:MollyController()
execute "sp molly"
call BindKeys()
call SetLocals()
call WriteToBuffer(s:filelist)
endfunction

function RefreshFileList()
Expand Down Expand Up @@ -142,9 +143,13 @@ endfunction
function ExecuteQuery()
let listcopy = copy(s:filelist)
let newlist = filter(listcopy, "v:val =~ \('" . s:query . "'\)")
call ClearBuffer()
call setline(".", newlist)
call WriteToBuffer(newlist)
unlet newlist
unlet listcopy
echo ">> " . s:query
endfunction

function WriteToBuffer(files)
call ClearBuffer()
call setline(".", a:files)
endfunction

0 comments on commit c23eaca

Please sign in to comment.