Skip to content

Commit

Permalink
feat(output): open window before jump
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Nov 4, 2020
1 parent a296db1 commit e38f0f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoload/ultest/output.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ function! ultest#output#close() abort
let g:ultest#output_windows = []
endfunction
function! s:OutputIsOpen()

return !empty(get(g:, "ultest#output_windows", []))
endfunction

function ultest#output#jumpto() abort
if !s:OutputIsOpen()
return
call ultest#output#open(ultest#handler#nearest_output(expand("%"), v:false))
if !s:OutputIsOpen()
return
endif
endif
call nvim_set_current_win(g:ultest#output_windows[0])
endfunction
Expand Down

0 comments on commit e38f0f3

Please sign in to comment.