The Scottish government survived a no-confidence vote on Wednesday, giving the Scottish National Party a chance to pick a new leader to replace outgoing First Minister Humza Yousaf.