mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #78 from sharelatex/ns-capital-letter-autocomplete-bug
allow for capital letters in commands; Fixes #56
This commit is contained in:
commit
3c0c670b5f
1 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ define [
|
||||||
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
|
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
|
||||||
lastTwoChars = lineUpToCursor.slice(-2)
|
lastTwoChars = lineUpToCursor.slice(-2)
|
||||||
# Don't offer autocomplete on double-backslash, backslash-colon, etc
|
# Don't offer autocomplete on double-backslash, backslash-colon, etc
|
||||||
if lastTwoChars.match(/^\\[^a-z]$/)
|
if lastTwoChars.match(/^\\[^a-zA-Z]$/)
|
||||||
@editor?.completer?.detach?()
|
@editor?.completer?.detach?()
|
||||||
return
|
return
|
||||||
if commandName in ['begin', 'end']
|
if commandName in ['begin', 'end']
|
||||||
|
@ -230,7 +230,7 @@ define [
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if lineBeyondCursor
|
if lineBeyondCursor
|
||||||
if partialCommandMatch = lineBeyondCursor.match(/^([a-z0-9]+)\{/)
|
if partialCommandMatch = lineBeyondCursor.match(/^([a-zA-Z0-9]+)\{/)
|
||||||
# We've got a partial command after the cursor
|
# We've got a partial command after the cursor
|
||||||
commandTail = partialCommandMatch[1]
|
commandTail = partialCommandMatch[1]
|
||||||
# remove rest of the partial command, right of cursor
|
# remove rest of the partial command, right of cursor
|
||||||
|
|
Loading…
Reference in a new issue