mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
Adjust the jumplist with line numbers too when opening a new file
This further addresses Issue #1758.
This commit is contained in:
@@ -88,10 +88,10 @@ endfunction
|
|||||||
|
|
||||||
function! ale#util#Open(filename, line, column, options) abort
|
function! ale#util#Open(filename, line, column, options) abort
|
||||||
if get(a:options, 'open_in_tab', 0)
|
if get(a:options, 'open_in_tab', 0)
|
||||||
call ale#util#Execute('tabedit ' . fnameescape(a:filename))
|
call ale#util#Execute('tabedit +' . a:line . ' ' . fnameescape(a:filename))
|
||||||
elseif bufnr(a:filename) isnot bufnr('')
|
elseif bufnr(a:filename) isnot bufnr('')
|
||||||
" Open another file only if we need to.
|
" Open another file only if we need to.
|
||||||
call ale#util#Execute('edit ' . fnameescape(a:filename))
|
call ale#util#Execute('edit +' . a:line . ' ' . fnameescape(a:filename))
|
||||||
else
|
else
|
||||||
normal! m`
|
normal! m`
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user