fix for using the default gg=G on files without formatting definitions at all
This commit is contained in:
parent
1dcabd579f
commit
9545f0cfcf
@ -60,6 +60,7 @@ endfunction
|
|||||||
function! s:TryAllFormatters(...) range
|
function! s:TryAllFormatters(...) range
|
||||||
" Make sure formatters are defined and detected
|
" Make sure formatters are defined and detected
|
||||||
if !call('<SID>find_formatters', a:000)
|
if !call('<SID>find_formatters', a:000)
|
||||||
|
exe "normal gg=G"
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -106,6 +107,7 @@ function! s:TryAllFormatters(...) range
|
|||||||
|
|
||||||
if s:index == b:current_formatter_index
|
if s:index == b:current_formatter_index
|
||||||
" Tried all formatters, none worked
|
" Tried all formatters, none worked
|
||||||
|
exe "normal gg=G"
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user