File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,10 @@ INTERFACE *fern-interface*
296
296
-----------------------------------------------------------------------------
297
297
VARIABLE *fern-variable*
298
298
299
+ *g:fern_disable_startup_warnings*
300
+ Set 1 to disable startup warning messages.
301
+ Default: 0
302
+
299
303
*g:fern#profile*
300
304
Set 1 to enable fern profiling mode.
301
305
Default: 0
Original file line number Diff line number Diff line change 1
- if exists (' g:loaded_fern' ) || (! has (' nvim' ) && ! has (' patch-8.1.0994' ))
1
+ if exists (' g:loaded_fern' )
2
+ finish
3
+ endif
4
+ let g: loaded_fern = 1
5
+
6
+ function ! s: warn (message) abort
7
+ if get (g: , ' fern_disable_startup_warnings' )
8
+ return
9
+ endif
10
+ echohl ErrorMsg
11
+ echo printf (' [fern] %s' , a: message )
12
+ echo ' [fern] Disable this warning message by adding "let g:fern_disable_startup_warning = 1" on your vimrc.'
13
+ echohl None
14
+ endfunction
15
+
16
+ if ! has (' nvim' ) && ! has (' patch-8.1.0994' )
2
17
" NOTE:
3
18
" At least https://github.com/vim/vim/releases/tag/v8.1.0994 is required
4
19
" thus minimum working version is 8.1.0994. Remember that minimum support
5
20
" version is not equal to this.
21
+ call s: warn (' Vim prior to 8.1.0994 does not have required feature thus fern is disabled.' )
22
+ finish
23
+ elseif exists (' +shellslash' ) && &shellslash
24
+ call s: warn (' "shellslash" option is not supported thus fern is disabled.' )
6
25
finish
26
+ elseif ! has (' nvim' ) && ! has (' patch-8.1.2269' )
27
+ call s: warn (' Vim prior to 8.1.2269 is not supported and fern might not work properly.' )
28
+ elseif has (' nvim' ) && ! has (' nvim-0.4.4' )
29
+ call s: warn (' Neovim prior to 0.4.4 is not supported and fern might not work properly.' )
7
30
endif
8
- let g: loaded_fern = 1
31
+
9
32
10
33
command ! - bar -nargs =*
11
34
\ -complete =customlist ,fern#internal#command #fern#complete
You can’t perform that action at this time.
0 commit comments