Skip to content

Commit

Permalink
fix: symbol sort order when ranges are equal (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 10, 2022
1 parent efc597c commit f40bb38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/aerial/backends/lsp/callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ local function process_symbols(symbols, bufnr)
end
end
table.sort(list, function(a, b)
a = a.selection_range and a.selection_range or a
b = b.selection_range and b.selection_range or b
if a.lnum == b.lnum then
return a.col < b.col
else
Expand Down

0 comments on commit f40bb38

Please sign in to comment.