mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Don't autocomplete for commands like \\, \[, \:, etc
This commit is contained in:
+3
-3
@@ -128,9 +128,9 @@ define [
|
||||
if lineUpToCursor.match(/.*%.*/)
|
||||
return
|
||||
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
|
||||
lastTwoCharsAreBackslash = lineUpToCursor.slice(-2) == "\\\\"
|
||||
# Don't offer autocomplete on double-backslash
|
||||
if lastTwoCharsAreBackslash
|
||||
lastTwoChars = lineUpToCursor.slice(-2)
|
||||
# Don't offer autocomplete on double-backslash, backslash-colon, etc
|
||||
if lastTwoChars.match(/^\\[^a-z]$/)
|
||||
@editor?.completer?.detach?()
|
||||
return
|
||||
commandFragment = getLastCommandFragment(lineUpToCursor)
|
||||
|
||||
Reference in New Issue
Block a user