summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-09-14 11:47:52 +0100
committerw0rp <devw0rp@gmail.com>2016-09-14 11:47:52 +0100
commit7fa437985fda31328dc23973a38fc9007b528c2b (patch)
tree1f5b286904f8508377a4886d506e3290a3ad54f9 /ale_linters
parent746ffe8acd72f3228aa6c5726d1c8dd6ee2b0513 (diff)
downloadale-7fa437985fda31328dc23973a38fc9007b528c2b.zip
Fix issues with switching buffers rapidly causing errors by remembering the buffer and passing the buffer value to various functions.
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/javascript/eslint.vim4
-rw-r--r--ale_linters/python/flake8.vim4
2 files changed, 4 insertions, 4 deletions
diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim
index 8eafd8a7..96dfef9b 100644
--- a/ale_linters/javascript/eslint.vim
+++ b/ale_linters/javascript/eslint.vim
@@ -4,7 +4,7 @@ endif
let g:loaded_ale_linters_javascript_eslint = 1
-function! ale_linters#javascript#eslint#Handle(lines)
+function! ale_linters#javascript#eslint#Handle(buffer, lines)
" Matches patterns line the following:
"
" <text>:47:14: Missing trailing comma. [Warning/comma-dangle]
@@ -29,7 +29,7 @@ function! ale_linters#javascript#eslint#Handle(lines)
" vcol is Needed to indicate that the column is a character.
call add(output, {
- \ 'bufnr': bufnr('%'),
+ \ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0,
\ 'vcol': 0,
\ 'col': l:match[2] + 0,
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim
index 4850f8ef..8f33f9ef 100644
--- a/ale_linters/python/flake8.vim
+++ b/ale_linters/python/flake8.vim
@@ -4,7 +4,7 @@ endif
let g:loaded_ale_linters_python_flake8 = 1
-function! ale_linters#python#flake8#Handle(lines)
+function! ale_linters#python#flake8#Handle(buffer, lines)
" Matches patterns line the following:
"
" stdin:6:6: E111 indentation is not a multiple of four
@@ -26,7 +26,7 @@ function! ale_linters#python#flake8#Handle(lines)
" vcol is Needed to indicate that the column is a character.
call add(output, {
- \ 'bufnr': bufnr('%'),
+ \ 'bufnr': a:buffer,
\ 'lnum': line,
\ 'vcol': 0,
\ 'col': column,