mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fold aceEditor resetSession into session set up
it is not used elsewhere, and mode setting is now done during the initialisation.
This commit is contained in:
parent
7258e947a8
commit
e9b5fc056d
1 changed files with 1 additions and 5 deletions
|
@ -207,11 +207,6 @@ define [
|
|||
|
||||
editor.setOption("scrollPastEnd", true)
|
||||
|
||||
resetSession = () ->
|
||||
session = editor.getSession()
|
||||
session.setUseWrapMode(true)
|
||||
session.setMode("ace/mode/latex")
|
||||
|
||||
updateCount = 0
|
||||
onChange = () ->
|
||||
updateCount++
|
||||
|
@ -235,6 +230,7 @@ define [
|
|||
editor.setSession(new EditSession(lines, mode))
|
||||
|
||||
session = editor.getSession()
|
||||
session.setUseWrapMode(true)
|
||||
|
||||
doc = session.getDocument()
|
||||
doc.on "change", onChange
|
||||
|
|
Loading…
Reference in a new issue