Improve fix to Windows gVim infinite shell loop.