Fix Ctrl+D Crashes and Freezes (#296)

Cleaned version of https://github.com/p-e-w/finalterm/pull/306
Did you see this issue with the commit applied? That behaviour never triggered for me, no matter how fast I tried, it was always working fine.