fixes issue #1 : cursor not placed at all in editor after hitting enter - OSX