From 7db805b0cd1367ebf866e0c149fd819e425f6e0d Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 6 Jun 2017 20:08:19 +0100 Subject: #482 - Fix Flow handling with relative paths --- ale_linters/javascript/flow.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ale_linters') diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim index 4e1494e2..1b13e5d1 100644 --- a/ale_linters/javascript/flow.vim +++ b/ale_linters/javascript/flow.vim @@ -42,7 +42,9 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort " Comments have no line of column information, so we skip them. " In certain cases, `l:message.loc.source` points to a different path " than the buffer one, thus we skip this loc information too. - if has_key(l:message, 'loc') && l:line ==# 0 && l:message.loc.source ==# expand('#' . a:buffer . ':p') + if has_key(l:message, 'loc') + \&& l:line ==# 0 + \&& ale#path#IsBufferPath(a:buffer, l:message.loc.source) let l:line = l:message.loc.start.line + 0 let l:col = l:message.loc.start.column + 0 endif -- cgit v1.2.3