Skip to content

Commit 8170562

Browse files
kaloyan-raevfelixfbecker
authored andcommitted
Shift end position in SymbolInformation ranges (#28)
Fixes #27
1 parent 4d5052b commit 8170562

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/SymbolFinder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function enterNode(Node $node)
6969
$this->uri,
7070
new Range(
7171
new Position($node->getAttribute('startLine') - 1, $node->getAttribute('startColumn') - 1),
72-
new Position($node->getAttribute('endLine') - 1, $node->getAttribute('endColumn') - 1)
72+
new Position($node->getAttribute('endLine') - 1, $node->getAttribute('endColumn'))
7373
)
7474
);
7575
$symbol->containerName = $this->containerName;

tests/Server/TextDocumentTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testDocumentSymbol()
3636
],
3737
'end' => [
3838
'line' => 2,
39-
'character' => 23
39+
'character' => 24
4040
]
4141
]
4242
],
@@ -54,7 +54,7 @@ public function testDocumentSymbol()
5454
],
5555
'end' => [
5656
'line' => 12,
57-
'character' => 0
57+
'character' => 1
5858
]
5959
]
6060
],
@@ -72,7 +72,7 @@ public function testDocumentSymbol()
7272
],
7373
'end' => [
7474
'line' => 6,
75-
'character' => 23
75+
'character' => 24
7676
]
7777
]
7878
],
@@ -90,7 +90,7 @@ public function testDocumentSymbol()
9090
],
9191
'end' => [
9292
'line' => 11,
93-
'character' => 4
93+
'character' => 5
9494
]
9595
]
9696
],
@@ -108,7 +108,7 @@ public function testDocumentSymbol()
108108
],
109109
'end' => [
110110
'line' => 17,
111-
'character' => 0
111+
'character' => 1
112112
]
113113
]
114114
],
@@ -126,7 +126,7 @@ public function testDocumentSymbol()
126126
],
127127
'end' => [
128128
'line' => 22,
129-
'character' => 0
129+
'character' => 1
130130
]
131131
]
132132
],

0 commit comments

Comments
 (0)