Scottish lawmakers also voted to keep the European Union flag flying outside the Scottish Parliament after Brexit.