Skip to content

Commit

Permalink
clear screen as part of the command
Browse files Browse the repository at this point in the history
This is a little faster and it also deals with race conditions when
`&t_te` and `t_ti` are doing things like enabling/disabling focus
tracking with vitality.vim.
  • Loading branch information
aaronjensen committed Feb 23, 2014
1 parent 00f0d4d commit 64926ab
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions autoload/vroom.vim
Expand Up @@ -196,12 +196,11 @@ function s:Run(cmd)
end end
endfunction endfunction


" Internal: Clear the screen prior to running specs " Internal: Clear the screen prior to running specs for vimux
" Otherwise, prefix the command with a clear.
function s:ClearScreen() function s:ClearScreen()
if g:vroom_use_vimux if g:vroom_use_vimux
call VimuxRunCommand("clear") call VimuxRunCommand("clear")
else
:silent !clear
endif endif
endfunction endfunction


Expand Down Expand Up @@ -238,6 +237,7 @@ function s:SetTestRunnerPrefix(filename)
call s:IsUsingBundleExec(a:filename) call s:IsUsingBundleExec(a:filename)
call s:IsUsingBinstubs() call s:IsUsingBinstubs()
call s:IsUsingSpring() call s:IsUsingSpring()
call s:IsClearScreenEnabled()
endfunction endfunction


" Internal: Check for .zeus.sock and use zeus instead of bundler " Internal: Check for .zeus.sock and use zeus instead of bundler
Expand Down Expand Up @@ -291,6 +291,14 @@ function s:IsUsingSpring()
endif endif
endfunction endfunction


" Internal: Check to see if we should clear the screen and prefixes
" s:test_runner_prefix as neessary
function s:IsClearScreenEnabled()
if g:vroom_clear_screen && !g:vroom_use_vimux
let s:test_runner_prefix = "clear; " . s:test_runner_prefix
endif
endfunction

" Internal: Checks for Gemfile, and sets s:test_runner_prefix as necessary " Internal: Checks for Gemfile, and sets s:test_runner_prefix as necessary
function s:CheckForGemfile() function s:CheckForGemfile()
if s:GemfileExists() if s:GemfileExists()
Expand Down

0 comments on commit 64926ab

Please sign in to comment.