summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-10 18:56:39 +0100
committerw0rp <devw0rp@gmail.com>2016-10-10 18:56:39 +0100
commit6f1ec7306dd1d4915171bc340290634de4c0b8e9 (patch)
treee70375531a0547453c052948ea872c99a22d27c8
parent0708531a136bed734e55bb08eafea3ddcabe5e78 (diff)
downloadale-6f1ec7306dd1d4915171bc340290634de4c0b8e9.zip
REVERT "#39 Use getbufline() for MacVim GUI too."
This reverts commit 3083d05afd3818e5db33f066392935bbf828e263.
-rw-r--r--plugin/ale/zmain.vim14
1 files changed, 5 insertions, 9 deletions
diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim
index 117f735c..16b0a476 100644
--- a/plugin/ale/zmain.vim
+++ b/plugin/ale/zmain.vim
@@ -10,9 +10,6 @@ let g:loaded_ale_zmain = 1
let s:lint_timer = -1
let s:linters = {}
-" These versions of Vim have bugs with the 'in_buf' option, so the buffer
-" must be sent via getbufline() instead.
-let s:has_in_buf_bugs = has('win32') || has('gui_macvim')
if !exists('g:ale_linters')
let g:ale_linters = {}
@@ -248,10 +245,8 @@ function! s:ApplyLinter(buffer, linter)
" othwerwise %PATHTEXT% will not be used to programs ending int
" .cmd, .bat, .exe, etc.
let l:command = 'cmd /c ' . l:command
- endif
-
- if !s:has_in_buf_bugs
- " On some Unix machines, we can send the Vim buffer directly.
+ else
+ " On Unix machines, we can send the Vim buffer directly.
" This is faster than reading the lines ourselves.
let job_options.in_io = 'buffer'
let job_options.in_buf = a:buffer
@@ -278,8 +273,9 @@ function! s:ApplyLinter(buffer, linter)
call jobsend(job, input)
call jobclose(job, 'stdin')
- elseif s:has_in_buf_bugs
- " On some Vim versions, we have to send the buffer data ourselves.
+ elseif has('win32')
+ " On Windows, we have to send the buffer lines ourselves,
+ " as there are issues with Windows and 'in_buf'
let input = join(getbufline(a:buffer, 1, '$'), "\n") . "\n"
let channel = job_getchannel(job)