summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-25 19:43:14 +0100
committerw0rp <devw0rp@gmail.com>2018-07-25 19:43:25 +0100
commit4ed35f7247b41ebd09f403257da54e059007851b (patch)
tree07c2f80346dc2e9d7437580d35e8a040a1963854
parentc4cb1c7050ef07293162439ff6550f227af3f597 (diff)
downloadale-4ed35f7247b41ebd09f403257da54e059007851b.zip
Fix #1758 - Set marks before going to definitions
-rw-r--r--autoload/ale/util.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/autoload/ale/util.vim b/autoload/ale/util.vim
index 879c983a..be37d1b5 100644
--- a/autoload/ale/util.vim
+++ b/autoload/ale/util.vim
@@ -89,11 +89,11 @@ endfunction
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
+ elseif bufnr(a:filename) isnot bufnr('')
" Open another file only if we need to.
- if bufnr(a:filename) isnot bufnr('')
- call ale#util#Execute('edit ' . fnameescape(a:filename))
- endif
+ call ale#util#Execute('edit ' . fnameescape(a:filename))
+ else
+ normal! m`
endif
call cursor(a:line, a:column)