Open requested to merge last-lang-layout into main
When the input purpose doesn't trigger a "special" layout like "terminal" we want to switch back to the last language layout on the next purpose change. This patch does that. Marked as draft as it's on top of !57 (merged) . I've not included it there as it's easier to test separately and it will likely not make it into 0.24.0.