summary refs log tree commit diff
path: root/litterbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'litterbox.c')
-rw-r--r--litterbox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/litterbox.c b/litterbox.c
index 3ede752..af531ff 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -216,7 +216,8 @@ static void querySearch(struct Message *msg) {
 					ELSE names.user
 				END,
 				events.target,
-				highlight(search, 6, :bold, :bold)
+				highlight(search, 6, :bold, :bold),
+				events.event
 			FROM events
 			JOIN contexts ON contexts.context = events.context
 			JOIN names ON names.name = events.name
@@ -227,7 +228,7 @@ static void querySearch(struct Message *msg) {
 			ORDER BY events.time DESC, events.event DESC
 			LIMIT :limit
 		)
-		SELECT * FROM results ORDER BY context, time;
+		SELECT * FROM results ORDER BY context, time, event;
 	);
 	dbPersist(&stmt, sql);
 	dbBindText(stmt, ":bold", "\2");