Pick newest session as documented, not oldest, from Magnus Gross.
authornicm <nicm@openbsd.org>
Thu, 4 Apr 2024 22:44:40 +0000 (22:44 +0000)
committernicm <nicm@openbsd.org>
Thu, 4 Apr 2024 22:44:40 +0000 (22:44 +0000)
usr.bin/tmux/server-fn.c

index ad01c8a..e3cd218 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.136 2024/03/21 11:30:42 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.137 2024/04/04 22:44:40 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -410,7 +410,7 @@ server_find_session(struct session *s,
 static int
 server_newer_session(struct session *s_loop, struct session *s_out)
 {
-       return (timercmp(&s_loop->activity_time, &s_out->activity_time, <));
+       return (timercmp(&s_loop->activity_time, &s_out->activity_time, >));
 }
 
 static int