HV 5952 then HV 7851 at Schiphol
Lisbon → Amsterdam → Edinburgh
Timetable, Amsterdam time
23:55HV 5952 from Lisbon at the gate
18:00HV 7851 to Edinburgh leaves the gate
18 h 05 apart on the timetable, overnight
HV 7851 leaves 18 h 05 after HV 5952 arrives on the timetable: more than half a day, so not a connection we count.