File tree Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,26 @@ function! ProjectionistDetect(path) abort
51
51
let root = fnamemodify (root, ' :h' )
52
52
endwhile
53
53
54
- let modelines = &modelines
55
- try
56
- set modelines = 0
57
- let g: projectionist_file = file
58
- silent doautocmd User ProjectionistDetect
59
- finally
60
- let &modelines = modelines
61
- unlet ! g: projectionist_file
62
- endtry
54
+ if exists (' #User#ProjectionistDetect' )
55
+ if v: version >= 704 || (v: version == 703 && has (' patch442' ))
56
+ try
57
+ let g: projectionist_file = file
58
+ doautocmd <nomodeline> User ProjectionistDetect
59
+ finally
60
+ unlet ! g: projectionist_file
61
+ endtry
62
+ else
63
+ let modelines = &modelines
64
+ try
65
+ set modelines = 0
66
+ let g: projectionist_file = file
67
+ doautocmd User ProjectionistDetect
68
+ finally
69
+ let &modelines = modelines
70
+ unlet ! g: projectionist_file
71
+ endtry
72
+ endif
73
+ endif
63
74
64
75
if ! empty (b: projectionist )
65
76
let b: projectionist_file = file
You can’t perform that action at this time.
0 commit comments