Bug 1027670 - Add IME that handle LaTeX

> Maybe I'm missing something but if you're at the beginning of the input, you can not be inside a command or environment because there were no starting environment.

That's true. But I'm using `textAfterCursor`. For `\sqrt{|}`, where `|` indicate the cursor position the `textAfterCursor` is `}` and to go ouside the command I need to increase at one the selection length.