diff options
author | w0rp <devw0rp@gmail.com> | 2018-06-21 21:20:54 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-06-21 21:20:54 +0100 |
commit | 8bca073763c4fecbfd4590d40da13cb84b1e55e4 (patch) | |
tree | 63d91a8807ddc11669eb83d773427383ae61f899 /test/test_go_to_definition.vader | |
parent | 22533f2c1f09bcf19dfba9e24a6a948c3d2716c0 (diff) | |
download | ale-8bca073763c4fecbfd4590d40da13cb84b1e55e4.zip |
Fix #1661 - Do not use :edit when jumping inside of a file
Diffstat (limited to 'test/test_go_to_definition.vader')
-rw-r--r-- | test/test_go_to_definition.vader | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test_go_to_definition.vader b/test/test_go_to_definition.vader index 3a1d7458..78373a65 100644 --- a/test/test_go_to_definition.vader +++ b/test/test_go_to_definition.vader @@ -187,6 +187,28 @@ Execute(Other files should be jumped to for LSP definition responses): AssertEqual [3, 7], getpos('.')[1:2] AssertEqual {}, ale#definition#GetMap() +Execute(Locations inside the same file should be jumped to without using :edit): + call ale#definition#SetMap({3: {'open_in_tab': 0}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'uri': ale#path#ToURI(ale#path#Simplify(expand('%:p'))), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ ], + \ g:expr_list + AssertEqual [3, 7], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + Execute(Other files should be jumped to in tabs for LSP definition responses): call ale#definition#SetMap({3: {'open_in_tab': 1}}) call ale#definition#HandleLSPResponse( |