In the project below, when selecting an EndApplication word from autocomplete suggestions, such as ENDIF, the line should be un-indented to match the base indentation of the Application from which the EndApplication word is ending, however this does not work at the moment. It currently works for EndApplication words that are typed in by the user using indentOnInput, but if there is a way to achieve a similar behaviour for words added from Autocomplete suggestions, that would be great.
You can view the code here
The editor website here
And an example of the issue below: