When passing arrays between child processes with node's IPC machanism,
`instance of Array` will return false for the deserialized array, we
should use the reiable way of detecting Array provided by underscore.
Read this for more:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
This bug was found when moving spell-check to use ProcessTask, and the
wrong Range object was returned for the passed misspelling value.
Previously an inserted automcomplete match would not
update the case of the prefix or suffix of the match
and instead only insert the text from the matched word
between the prefix and suffix.
Now the entire matched word is inserted as-is replacing
the existing prefix and suffix.
Snippet placeholders are managed by adding an "anchor range" to the edit session. An anchor range basically tracks two anchors for the start and the end of the range.
Takes a position, and finds the position of the closing bracket that matches the opening bracket at that position. Only works with curly-braces for now.