Don't offer autocomplete for double-backslash

This commit is contained in:
Shane Kilkelly 2017-07-13 10:22:51 +01:00
parent 952a765235
commit 75b0e0cf51

View file

@ -128,6 +128,11 @@ define [
if lineUpToCursor.match(/.*%.*/)
return
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
lastTwoCharsAreBackslash = lineUpToCursor.slice(-2) == "\\\\"
# Don't offer autocomplete on double-backslash
if lastTwoCharsAreBackslash
@editor?.completer?.detach?()
return
commandFragment = getLastCommandFragment(lineUpToCursor)
commandName = getCommandNameFromFragment(commandFragment)
if commandName in ['begin', 'end']