fix use of context helper in onChange

This commit is contained in:
Shane Kilkelly 2017-08-31 08:59:38 +01:00
parent 708afedeb4
commit 8a612df009

View file

@ -142,8 +142,8 @@ define [
onChange: (change) ->
cursorPosition = @editor.getCursorPosition()
end = change.end
context = Helpers.getContext(editor, end)
{lineUpToCursor, commandFragment, lineBeyondCursor, needsClosingBrace} = context
context = Helpers.getContext(@editor, end)
{lineUpToCursor, commandFragment, commandName, lineBeyondCursor, needsClosingBrace} = context
if lineUpToCursor.match(/.*%.*/)
return
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"