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

fold aceEditor resetSession into session set up

it is not used elsewhere, and mode setting is now done during the
initialisation.
Brian Gough 10 лет назад
Родитель
Сommit
e9b5fc056d
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      services/web/public/coffee/ide/editor/directives/aceEditor.coffee

+ 1 - 5
services/web/public/coffee/ide/editor/directives/aceEditor.coffee

@@ -207,11 +207,6 @@ define [
 
 
 				editor.setOption("scrollPastEnd", true)
 				editor.setOption("scrollPastEnd", true)
 
 
-				resetSession = () ->
-					session = editor.getSession()
-					session.setUseWrapMode(true)
-					session.setMode("ace/mode/latex")
-
 				updateCount = 0
 				updateCount = 0
 				onChange = () ->
 				onChange = () ->
 					updateCount++
 					updateCount++
@@ -235,6 +230,7 @@ define [
 					editor.setSession(new EditSession(lines, mode))
 					editor.setSession(new EditSession(lines, mode))
 
 
 					session = editor.getSession()
 					session = editor.getSession()
+					session.setUseWrapMode(true)
 
 
 					doc = session.getDocument()
 					doc = session.getDocument()
 					doc.on "change", onChange
 					doc.on "change", onChange