mirror of
https://github.com/lewis6991/gitsigns.nvim
synced 2024-09-16 14:34:09 +02:00
fix: sort get_nav_hunks to handle mixed hunk states
This commit is contained in:
parent
562dc47189
commit
80214a857c
1 changed files with 3 additions and 0 deletions
|
@ -569,6 +569,9 @@ local function get_nav_hunks(bufnr, target, greedy)
|
|||
if target == 'all' then
|
||||
hunks = hunks_main
|
||||
vim.list_extend(hunks, hunks_head)
|
||||
table.sort(hunks, function(h1, h2)
|
||||
return h1.added.start < h2.added.start
|
||||
end)
|
||||
elseif target == 'staged' then
|
||||
hunks = hunks_head
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue