Break sorting out into a common file so formats and modes use the same

code. Also add -O for sorting to the list commands. From Dane Jensen in
GitHub issue 4813.
This commit is contained in:
nicm
2026-02-02 10:08:30 +00:00
parent 66011fe48b
commit 3c3d9ce3a9
19 changed files with 946 additions and 674 deletions

View File

@@ -438,9 +438,9 @@ server_destroy_session(struct session *s)
else if (detach_on_destroy == 2)
s_new = server_find_session(s, server_newer_detached_session);
else if (detach_on_destroy == 3)
s_new = session_previous_session(s);
s_new = session_previous_session(s, NULL);
else if (detach_on_destroy == 4)
s_new = session_next_session(s);
s_new = session_next_session(s, NULL);
/*
* If no suitable new session was found above, then look for any