Ensure cloze numbers sort in order

https://forums.ankiweb.net/t/anki-23-12-beta/37771/103
This commit is contained in:
Damien Elmes 2023-12-12 09:51:42 +10:00
parent db93939ded
commit 45abf1c7e8

View file

@ -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(),