Mercurial > vim-crosoft
changeset 12:1639be0967d6
Warn if multiple solutions have been found in the project.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 29 Aug 2023 12:50:59 -0700 |
parents | 096e80c13781 |
children | dce01b0e9982 |
files | autoload/vimcrosoft.vim plugin/vimcrosoft.vim |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/vimcrosoft.vim Fri Jan 22 16:42:25 2021 -0800 +++ b/autoload/vimcrosoft.vim Tue Aug 29 12:50:59 2023 -0700 @@ -267,6 +267,12 @@ let l:slnfiles = globpath(l:cur, '*.sln', 0, 1) if !empty(l:slnfiles) call vimcrosoft#trace("Found solution file: ".l:slnfiles[0]) + if len(l:slnfiles) > 1 && g:vimcrosoft_warn_multiple_slns + let l:warnmsg = "Found multiple solutions files: " + \.join(l:slnfiles, " ; ") + \." Check or change the auto-chosen first one." + call vimcrosoft#warning(l:warnmsg) + endif return l:slnfiles[0] endif let l:prev = l:cur
--- a/plugin/vimcrosoft.vim Fri Jan 22 16:42:25 2021 -0800 +++ b/plugin/vimcrosoft.vim Tue Aug 29 12:50:59 2023 -0700 @@ -16,6 +16,7 @@ let g:vimcrosoft_auto_find_sln = get(g:, 'vimcrosoft_auto_find_sln', 0) let g:vimcrosoft_sln_finder = get(g:, 'vimcrosoft_sln_finder', '') +let g:vimcrosoft_warn_multiple_slns = get(g:, 'vimcrosoft_warn_multiple_slns', 1) let g:vimcrosoft_current_sln_cache = ''