diff --git a/src/freebsd/btop_collect.cpp b/src/freebsd/btop_collect.cpp index 2ca6152..1992086 100644 --- a/src/freebsd/btop_collect.cpp +++ b/src/freebsd/btop_collect.cpp @@ -1326,7 +1326,7 @@ namespace Proc { } //? Final sort based on tree index - rng::sort(current_procs, rng::less{}, & proc_info::tree_index); + rng::stable_sort(current_procs, rng::less {}, &proc_info::tree_index); //? Move current selection/view to the selected process when collapsing/expanding in the tree if (locate_selection) { diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 0701d49..cc58b46 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -3279,7 +3279,7 @@ namespace Proc { } //? Final sort based on tree index - rng::sort(current_procs, rng::less{}, & proc_info::tree_index); + rng::stable_sort(current_procs, rng::less {}, &proc_info::tree_index); //? Move current selection/view to the selected process when collapsing/expanding in the tree if (locate_selection) { diff --git a/src/netbsd/btop_collect.cpp b/src/netbsd/btop_collect.cpp index a66f2fb..9677235 100644 --- a/src/netbsd/btop_collect.cpp +++ b/src/netbsd/btop_collect.cpp @@ -1389,7 +1389,7 @@ namespace Proc { } //? Final sort based on tree index - rng::sort(current_procs, rng::less{}, & proc_info::tree_index); + rng::stable_sort(current_procs, rng::less {}, &proc_info::tree_index); //? Move current selection/view to the selected process when collapsing/expanding in the tree if (locate_selection) { diff --git a/src/openbsd/btop_collect.cpp b/src/openbsd/btop_collect.cpp index b724e57..d1a753e 100644 --- a/src/openbsd/btop_collect.cpp +++ b/src/openbsd/btop_collect.cpp @@ -1264,7 +1264,7 @@ namespace Proc { } //? Final sort based on tree index - rng::sort(current_procs, rng::less{}, & proc_info::tree_index); + rng::stable_sort(current_procs, rng::less {}, &proc_info::tree_index); //? Move current selection/view to the selected process when collapsing/expanding in the tree if (locate_selection) { diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp index c3b24a2..0e3cab5 100644 --- a/src/osx/btop_collect.cpp +++ b/src/osx/btop_collect.cpp @@ -1402,7 +1402,7 @@ namespace Proc { } //? Final sort based on tree index - rng::sort(current_procs, rng::less{}, & proc_info::tree_index); + rng::stable_sort(current_procs, rng::less {}, &proc_info::tree_index); //? Move current selection/view to the selected process when collapsing/expanding in the tree if (locate_selection) {