Mercurial > vim-unreal
changeset 7:59d75d8c254f
Don't complain on startup if no UE branch is found.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 26 Jan 2021 11:59:58 -0800 |
parents | 613f13dc42f7 |
children | 5cd58b3fd93d |
files | autoload/unreal.vim |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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