Skip to content

Commit

Permalink
fix(document_symbols): handle struct which is last expression in a block
Browse files Browse the repository at this point in the history
Closes #111
  • Loading branch information
mhanberg committed Oct 2, 2023
1 parent c9ed931 commit d4ea0b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/next_ls/document_symbol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ defmodule NextLS.DocumentSymbol do
character: meta[:column] - 1
},
end: %Position{
line: meta[:end_of_expression][:line] - 1,
character: meta[:end_of_expression][:column] - 1
line: (meta[:end_of_expression][:line] || meta[:line]) - 1,
character: (meta[:end_of_expression][:column] || meta[:column]) - 1
}
},
selection_range: %Range{
Expand Down

0 comments on commit d4ea0b2

Please sign in to comment.