Start experimenting with generic functions for fixing problems

This commit is contained in:
w0rp 2017-05-18 17:50:39 +01:00
parent 0b743389e5
commit ea1627f5ce

View file

@ -0,0 +1,12 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Generic functions for fixing files with.
function! ale#fix#generic#RemoveTrailingBlankLines(buffer, lines) abort
let l:end_index = len(a:lines) - 1
while l:end_index > 0 && empty(a:lines[l:end_index])
let l:end_index -= 1
endwhile
return a:lines[:l:end_index]
endfunction