When the verse "When the help of Allah and the victory comes" [Nasr 110:1] was revealed, the Prophet ﷺ knew that his death had been announced to him. So he was told "When the help of Allah comes..." the entire surah.
حدثنا وكيع عن سفيان عن عاصم عن أبي رزين
لما نزلت إذا جاء نصر الله والفتح علم النبي ﷺ أن قد نعيت إليه نفسه فقيل إذا جاء نصر الله السورة كلها