From 45abf1c7e8f9dac3806d2fb453f61ee62aeec6da Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 12 Dec 2023 09:51:42 +1000 Subject: [PATCH] Ensure cloze numbers sort in order https://forums.ankiweb.net/t/anki-23-12-beta/37771/103 --- rslib/src/search/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/search/mod.rs b/rslib/src/search/mod.rs index 5d26392a4..ba8178e68 100644 --- a/rslib/src/search/mod.rs +++ b/rslib/src/search/mod.rs @@ -359,7 +359,7 @@ fn card_order_from_sort_column(column: Column, timing: SchedTimingToday) -> Cow< Column::Cards => concat!( "coalesce((select pos from sort_order where ntid = n.mid and ord = c.ord),", // need to fall back on ord 0 for cloze cards - "(select pos from sort_order where ntid = n.mid and ord = 0)) asc" + "(select pos from sort_order where ntid = n.mid and ord = 0)) asc, ord asc" ) .into(), Column::Deck => "(select pos from sort_order where did = c.did) asc".into(),