diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f985ef0..2b1363a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.1-dev +# 0.1.1 - Call initialize first for better protocol compliance - Use a relative path where possible when jumping to definition @@ -6,6 +6,7 @@ - Bug Fix: Less likely to delete inserted text when trying to complete - Bug Fix: More likely to try to complete when not following a '.' - Populate location list with diagnostics +- Bug fix: Don't try to 'edit' the current file # 0.1.0 diff --git a/autoload/lsc/reference.vim b/autoload/lsc/reference.vim index 0aa92690..c282476f 100644 --- a/autoload/lsc/reference.vim +++ b/autoload/lsc/reference.vim @@ -40,7 +40,9 @@ function! s:isGoToValid(old_pos, goto_definition_id) abort endfunction function! s:goTo(file, line, character) abort - let relative_path = fnamemodify(a:file, ":~:.") - exec 'edit '.relative_path + if a:file != expand('%:p') + let relative_path = fnamemodify(a:file, ":~:.") + exec 'edit '.relative_path + endif call cursor(a:line, a:character) endfunction