فهرست منبع

Don't offer autocomplete for double-backslash

Shane Kilkelly 9 سال پیش
والد
کامیت
75b0e0cf51

+ 5 - 0
services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee

@@ -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']