Only write modified buffers
c0478d185044fe0a49462a7222399165f584afcc
1 parent
88e283ca
.vimrc
+1 -1
| 81 | 81 | endif |
|
| 82 | 82 | ||
| 83 | 83 | " Save on focus lost |
|
| 84 | 84 | au FocusLost * call s:SaveOnFocusLost() |
|
| 85 | 85 | function! s:SaveOnFocusLost() |
|
| 86 | - | if !empty(expand('%:p')) |
|
| 86 | + | if !empty(expand('%:p')) && &modified |
|
| 87 | 87 | write |
|
| 88 | 88 | endif |
|
| 89 | 89 | endfunction |
|
| 90 | 90 | ||
| 91 | 91 | " Per file-type indentation |