Merge branch 'sk-ac-more-eager-trigger' into sk-ac-improvements-integration

This commit is contained in:
Shane Kilkelly 2017-07-06 14:38:44 +01:00
commit 9ac15c9d47

View file

@ -126,6 +126,7 @@ define [
lineUpToCursor = @editor.getSession().getTextRange(range) lineUpToCursor = @editor.getSession().getTextRange(range)
if lineUpToCursor.match(/.*%.*/) if lineUpToCursor.match(/.*%.*/)
return return
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
commandFragment = getLastCommandFragment(lineUpToCursor) commandFragment = getLastCommandFragment(lineUpToCursor)
commandName = getCommandNameFromFragment(commandFragment) commandName = getCommandNameFromFragment(commandFragment)
if commandName in ['begin', 'end'] if commandName in ['begin', 'end']
@ -138,7 +139,7 @@ define [
end.row == cursorPosition.row and end.row == cursorPosition.row and
end.column == cursorPosition.column + 1 end.column == cursorPosition.column + 1
) )
if commandFragment? and commandFragment.length > 2 if (commandFragment? and commandFragment.length > 2) or lastCharIsBackslash
setTimeout () => setTimeout () =>
@editor.execCommand("startAutocomplete") @editor.execCommand("startAutocomplete")
, 0 , 0