At the first glance I didn't see the side effects which can change the result of ```isatty(1)``` between these two methods. I found perhaps related code in ```os_amiga``` module from original vim. But I don't have enough time to understand it now. So I'll just do it like you said.