summaryrefslogtreecommitdiff
path: root/test/test_loclist_jumping.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-17 22:08:03 +0100
committerw0rp <devw0rp@gmail.com>2019-05-17 22:08:03 +0100
commit652d991077ac3261e51abfa51d979774a555b405 (patch)
tree9999bca754373a43f731df27e4269a3149e12a15 /test/test_loclist_jumping.vader
parente6745a38118068dbfe8246041de17a5f5c5bf149 (diff)
downloadale-652d991077ac3261e51abfa51d979774a555b405.zip
Fix #1317 - Jump to column 1 for problems at column 0
Diffstat (limited to 'test/test_loclist_jumping.vader')
-rw-r--r--test/test_loclist_jumping.vader17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/test_loclist_jumping.vader b/test/test_loclist_jumping.vader
index 3b6f0688..8ec4e583 100644
--- a/test/test_loclist_jumping.vader
+++ b/test/test_loclist_jumping.vader
@@ -21,7 +21,7 @@ Before:
if type(a:position) == type(0)
call ale#loclist_jumping#JumpToIndex(a:position)
else
- call ale#loclist_jumping#Jump(a:position, a:wrap, a:filter,
+ call ale#loclist_jumping#Jump(a:position, a:wrap, a:filter,
\ a:subtype_filter)
endif
@@ -104,3 +104,18 @@ Execute(We should be able to jump when the error line is blank):
AssertEqual [2, 8], TestJump('before', 1, 'any', 'any', [3, 1])
AssertEqual [3, 1], TestJump('after', 0, 'any', 'any', [3, 1])
AssertEqual [1, 2], TestJump('after', 1, 'any', 'any', [3, 1])
+
+Execute(ALE should jump to column 1 instead of 0):
+ let g:ale_buffer_info = {
+ \ bufnr(''): {
+ \ 'loclist': [
+ \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 1, 'col': 5},
+ \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 2, 'col': 0},
+ \ ],
+ \ },
+ \}
+
+ AssertEqual [2, 1], TestJump('after', 1, 'any', 'any', [1, 5])
+ AssertEqual [1, 5], TestJump('after', 1, 'any', 'any', [2, 1])
+ AssertEqual [2, 1], TestJump('before', 1, 'any', 'any', [1, 5])
+ AssertEqual [1, 5], TestJump('before', 1, 'any', 'any', [2, 1])