marijnh/CodeMirror — pull request #1671 by aslushnikov (2013-07-12 08:59:26+00:00)
Title: [Closebrackets addon] Fix closebrackets plugin

Consider the following situation:

```
var a = "sweet|
```
(the `|` represents cursor)

Currently, if you hit `"` in this situation, a pair of quotes will be inserted. It would be better to insert a single quote in this case.

This patch handles this situation: it prevents a pair of quotes insertion if the cursor is located right after some word.

Additionally this patch exposes `isWordChar` into `CodeMirror` object so that it might be able to check for word chars in the same way CodeMirror does. If there's another method in CM's api that will help to do this, please let me know.