tweaks: reduce a bit of code duplication

This also removes a call of ungetch(), as it does not seem to be
needed any more: nano does not lose a character when waking from
suspension.
1 file changed