mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'sk-ac-more-eager-trigger' into sk-ac-improvements-integration
This commit is contained in:
commit
9ac15c9d47
1 changed files with 2 additions and 1 deletions
|
@ -126,6 +126,7 @@ define [
|
|||
lineUpToCursor = @editor.getSession().getTextRange(range)
|
||||
if lineUpToCursor.match(/.*%.*/)
|
||||
return
|
||||
lastCharIsBackslash = lineUpToCursor.slice(-1) == "\\"
|
||||
commandFragment = getLastCommandFragment(lineUpToCursor)
|
||||
commandName = getCommandNameFromFragment(commandFragment)
|
||||
if commandName in ['begin', 'end']
|
||||
|
@ -138,7 +139,7 @@ define [
|
|||
end.row == cursorPosition.row and
|
||||
end.column == cursorPosition.column + 1
|
||||
)
|
||||
if commandFragment? and commandFragment.length > 2
|
||||
if (commandFragment? and commandFragment.length > 2) or lastCharIsBackslash
|
||||
setTimeout () =>
|
||||
@editor.execCommand("startAutocomplete")
|
||||
, 0
|
||||
|
|
Loading…
Reference in a new issue