ajaxorg/ace — Issue #511: `env` object pased to `exec` method doesn't contain the editor anymore
Author: sergi
Created: 2011-11-17 17:29:12+00:00
State: open

The `exec` method in commands receives the `env` variable, which until recently carried an instance of `Editor`, where methods like `navigateRight` could be called. Apparently `env.editor` has been deprecated (unless it is a bug).

How can we call methods in the current editor from commands now? It is a quite common scenario, I'd say.

As an example, this command won't work anymore now:

```javascript
var goToEndWord = function(env, params, request) {
env.editor.navigateWordRight(); //env.editor doesn't exist anymore
},
```

What would be the recommended way to call an editor method from inside a command now?