diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-25 13:56:51 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-25 13:56:51 +0100 |
commit | 4eaa990fe8f1de3c767c6281d413506356999302 (patch) | |
tree | 41c77ff86992bc597248dd50a21c70f4a71a3a6f /autoload | |
parent | 8da56413555377a3012250f4d984a143e97945ee (diff) | |
download | ale-4eaa990fe8f1de3c767c6281d413506356999302.zip |
Fix #684 - Use the JSON format for tslint, for consistency betwen versions, and handling of end line and column numbers
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/path.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/autoload/ale/path.vim b/autoload/ale/path.vim index e8a5de27..2c1d5133 100644 --- a/autoload/ale/path.vim +++ b/autoload/ale/path.vim @@ -78,6 +78,16 @@ function! ale#path#IsBufferPath(buffer, complex_filename) abort let l:test_filename = l:test_filename[2:] endif + if l:test_filename[:1] ==# '..' + " Remove ../../ etc. from the front of the path. + let l:test_filename = substitute(l:test_filename, '\v^(\.\.[/\\])+', '/', '') + endif + + " Use the basename for files in /tmp, as they are likely our files. + if l:test_filename[:len($TMPDIR) - 1] ==# $TMPDIR + let l:test_filename = fnamemodify(l:test_filename, ':t') + endif + let l:buffer_filename = expand('#' . a:buffer . ':p') return l:buffer_filename ==# l:test_filename |