summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-12-18 11:13:28 +0000
committerw0rp <devw0rp@gmail.com>2018-12-18 11:13:28 +0000
commitf1ed654ca5318de5a24b37d882e55e04e4e566c8 (patch)
tree2a41c15887e1bf5a9fed3b466a2c24f62545d54a /autoload
parent0e3778e335f67a48571bf2b7c5c59c73005efdfa (diff)
downloadale-f1ed654ca5318de5a24b37d882e55e04e4e566c8.zip
#2132 Change (buffer, lines) fixer functions to (buffer, done, lines)
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix.vim4
-rw-r--r--autoload/ale/fixers/generic.vim4
-rw-r--r--autoload/ale/fixers/generic_python.vim4
-rw-r--r--autoload/ale/fixers/help.vim2
4 files changed, 7 insertions, 7 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index 03652ecf..423e85be 100644
--- a/autoload/ale/fix.vim
+++ b/autoload/ale/fix.vim
@@ -315,10 +315,10 @@ function! s:RunFixer(options) abort
\ ? call(l:Function, [l:buffer, a:options.output])
\ : call(l:Function, [l:buffer, a:options.output, copy(l:input)])
else
- " Chained commands accept (buffer, [input])
+ " Chained commands accept (buffer, [done, input])
let l:result = ale#util#FunctionArgCount(l:Function) == 1
\ ? call(l:Function, [l:buffer])
- \ : call(l:Function, [l:buffer, copy(l:input)])
+ \ : call(l:Function, [l:buffer, v:null, copy(l:input)])
endif
if type(l:result) is v:t_number && l:result == 0
diff --git a/autoload/ale/fixers/generic.vim b/autoload/ale/fixers/generic.vim
index cb8865b4..1d88553e 100644
--- a/autoload/ale/fixers/generic.vim
+++ b/autoload/ale/fixers/generic.vim
@@ -1,7 +1,7 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Generic functions for fixing files with.
-function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort
+function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, done, lines) abort
let l:end_index = len(a:lines) - 1
while l:end_index > 0 && empty(a:lines[l:end_index])
@@ -12,7 +12,7 @@ function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort
endfunction
" Remove all whitespaces at the end of lines
-function! ale#fixers#generic#TrimWhitespace(buffer, lines) abort
+function! ale#fixers#generic#TrimWhitespace(buffer, done, lines) abort
let l:index = 0
let l:lines_new = range(len(a:lines))
diff --git a/autoload/ale/fixers/generic_python.vim b/autoload/ale/fixers/generic_python.vim
index d55a23c3..9a929b96 100644
--- a/autoload/ale/fixers/generic_python.vim
+++ b/autoload/ale/fixers/generic_python.vim
@@ -2,7 +2,7 @@
" Description: Generic fixer functions for Python.
" Add blank lines before control statements.
-function! ale#fixers#generic_python#AddLinesBeforeControlStatements(buffer, lines) abort
+function! ale#fixers#generic_python#AddLinesBeforeControlStatements(buffer, done, lines) abort
let l:new_lines = []
let l:last_indent_size = 0
let l:last_line_is_blank = 0
@@ -41,7 +41,7 @@ endfunction
" This function breaks up long lines so that autopep8 or other tools can
" fix the badly-indented code which is produced as a result.
-function! ale#fixers#generic_python#BreakUpLongLines(buffer, lines) abort
+function! ale#fixers#generic_python#BreakUpLongLines(buffer, done, lines) abort
" Default to a maximum line length of 79
let l:max_line_length = 79
let l:conf = ale#path#FindNearestFile(a:buffer, 'setup.cfg')
diff --git a/autoload/ale/fixers/help.vim b/autoload/ale/fixers/help.vim
index b20740fe..9fb0717b 100644
--- a/autoload/ale/fixers/help.vim
+++ b/autoload/ale/fixers/help.vim
@@ -1,7 +1,7 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Generic fixer functions for Vim help documents.
-function! ale#fixers#help#AlignTags(buffer, lines) abort
+function! ale#fixers#help#AlignTags(buffer, done, lines) abort
let l:new_lines = []
for l:line in a:lines