Commit 7f74f954 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Remove the extra init function from editor

parent d74cb8e5
...@@ -14,8 +14,6 @@ function Editor (doNotLoadStorage, storage) { ...@@ -14,8 +14,6 @@ function Editor (doNotLoadStorage, storage) {
var sessions = {} var sessions = {}
var sourceAnnotations = [] var sourceAnnotations = []
setupStuff()
this.addMarker = function (range, cssClass) { this.addMarker = function (range, cssClass) {
return editor.session.addMarker(range, cssClass) return editor.session.addMarker(range, cssClass)
} }
...@@ -170,7 +168,8 @@ function Editor (doNotLoadStorage, storage) { ...@@ -170,7 +168,8 @@ function Editor (doNotLoadStorage, storage) {
return s return s
} }
function setupStuff () { // Do setup on initialisation here
// Unmap ctrl-t & ctrl-f // Unmap ctrl-t & ctrl-f
editor.commands.bindKeys({ 'ctrl-t': null }) editor.commands.bindKeys({ 'ctrl-t': null })
editor.commands.bindKeys({ 'ctrl-f': null }) editor.commands.bindKeys({ 'ctrl-f': null })
...@@ -194,7 +193,6 @@ function Editor (doNotLoadStorage, storage) { ...@@ -194,7 +193,6 @@ function Editor (doNotLoadStorage, storage) {
editor.setSession(sessions[this.getCacheFile()]) editor.setSession(sessions[this.getCacheFile()])
editor.resize(true) editor.resize(true)
}
} }
module.exports = Editor module.exports = Editor
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment