Do not remove trailing whitespaces if the file is a diff

This commit is contained in:
Kevin Cotugno 2018-12-13 07:24:01 -08:00
parent fced85576c
commit 92702dee8f

View File

@ -52,6 +52,8 @@ set mouse=a
set list set list
set listchars=tab:――,space,trail set listchars=tab:――,space,trail
let g:NoClean = ["diff"]
autocmd BufRead,BufNewFile autocmd BufRead,BufNewFile
\ *.cs, \ *.cs,
\*.java \*.java
@ -105,6 +107,7 @@ endfunction
function Writeable() function Writeable()
return &buftype == '' return &buftype == ''
\ && index(g:NoClean, &filetype) == -1
\ && !&readonly \ && !&readonly
\ && &modifiable \ && &modifiable
\ && &modified \ && &modified