File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -616,9 +616,9 @@ func (f *file) IndexSymbols(ctx context.Context) {
616616
617617 // Finally, sort the symbols in position order, with shorter symbols sorting smaller.
618618 slices .SortFunc (f .symbols , func (s1 , s2 * symbol ) int {
619- diff := s1 .span .StartLoc (). Offset - s2 .span .StartLoc (). Offset
619+ diff := s1 .span .Start - s2 .span .Start
620620 if diff == 0 {
621- return s1 .span .EndLoc (). Offset - s2 .span .EndLoc (). Offset
621+ return s1 .span .End - s2 .span .End
622622 }
623623 return diff
624624 })
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ func getCommentsFromDef(def ast.DeclDef) string {
280280 var comments []string
281281 // We drop the other side of "Around" because we only care about the beginning -- we're
282282 // traversing backwards for leading comemnts only.
283- _ , start := def .Context ().Stream ().Around (def .Span ().StartLoc (). Offset )
283+ _ , start := def .Context ().Stream ().Around (def .Span ().Start )
284284 cursor := token .NewCursorAt (start )
285285 t := cursor .PrevSkippable ()
286286 for ! t .IsZero () {
You can’t perform that action at this time.
0 commit comments