Просмотр исходного кода

Don't trigger autocomplete if we're on a comment line.

Shane Kilkelly 9 лет назад
Родитель
Сommit
db80f8ca1c

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

@@ -121,6 +121,8 @@ define [
 			end = change.end
 			range = new Range(end.row, 0, end.row, end.column)
 			lineUpToCursor = @editor.getSession().getTextRange(range)
+			if lineUpToCursor.slice(0, 1) == '%'
+				return
 			commandFragment = getLastCommandFragment(lineUpToCursor)
 			# Check that this change was made by us, not a collaborator
 			# (Cursor is still one place behind)