Added ctrl-D handling (accept in insert mode, exit in cmd mode).