In split_hunk, move ui_save earlier, for better crash behaviour.