Fix #1661 - Do not use :edit when jumping inside of a file

This commit is contained in:
w0rp
2018-06-21 21:20:54 +01:00
parent 22533f2c1f
commit 8bca073763
2 changed files with 26 additions and 1 deletions

View File

@@ -56,7 +56,10 @@ function! ale#util#Open(filename, line, column, options) abort
if get(a:options, 'open_in_tab', 0)
call ale#util#Execute('tabedit ' . fnameescape(a:filename))
else
call ale#util#Execute('edit ' . fnameescape(a:filename))
" Open another file only if we need to.
if bufnr(a:filename) isnot bufnr('')
call ale#util#Execute('edit ' . fnameescape(a:filename))
endif
endif
call cursor(a:line, a:column)