core: Use switch in display_helper.