# HG changeset patch # User Ludovic Chabant # Date 1611691198 28800 # Node ID 59d75d8c254f7e8352c257eda1f560ad225b8fb0 # Parent 613f13dc42f7bfba86ddf1f24b5c7778f7bffff4 Don't complain on startup if no UE branch is found. diff -r 613f13dc42f7 -r 59d75d8c254f autoload/unreal.vim --- a/autoload/unreal.vim Fri Jan 22 17:51:29 2021 -0800 +++ b/autoload/unreal.vim Tue Jan 26 11:59:58 2021 -0800 @@ -81,15 +81,15 @@ " Branch and Project Management {{{ -function! unreal#find_branch_dir_and_project() abort - call unreal#find_branch_dir() +function! unreal#find_branch_dir_and_project(silent) abort + call unreal#find_branch_dir(a:silent) if !empty(g:unreal_branch_dir) call unreal#find_project() endif endfunction -function! unreal#find_branch_dir() abort +function! unreal#find_branch_dir(silent) abort if !empty(g:unreal_branch_dir_finder) let l:branch_dir = call(g:unreal_branch_dir_finder) else @@ -99,7 +99,11 @@ if !empty(l:branch_dir) call unreal#set_branch_dir(l:branch_dir, 1) " Set branch silently. else - call unreal#throw("No UE branch found!") + if a:silent + call unreal#trace("No UE branch found") + else + call unreal#throw("No UE branch found!") + endif endif endfunction @@ -586,7 +590,7 @@ function! unreal#init() abort if g:unreal_auto_find_project - call unreal#find_branch_dir_and_project() + call unreal#find_branch_dir_and_project(1) endif endfunction