Remove debug logs

This commit is contained in:
Shane Kilkelly 2017-05-24 14:28:15 +01:00
parent 1f3a375b4e
commit b871cdab4c
2 changed files with 1 additions and 8 deletions

View file

@ -45,7 +45,6 @@ define [
labelsManager = @labelsManager
LabelsCompleter =
getCompletions: (editor, session, pos, prefxi, callback) ->
# console.log ">> [LabelsCompleter] getting completions"
upToCursorRange = new Range(pos.row, 0, pos.row, pos.column)
lineUpToCursor = editor.getSession().getTextRange(upToCursorRange)
commandFragment = getLastCommandFragment(lineUpToCursor)
@ -120,7 +119,6 @@ define [
})
onChange: (change) ->
window.EDITOR = @editor
cursorPosition = @editor.getCursorPosition()
end = change.end
# Check that this change was made by us, not a collaborator
@ -134,7 +132,6 @@ define [
if commandFragment? and commandFragment.length > 2
if commandFragment.startsWith('\\label{')
# console.log ">> LABEL IS HERE"
@labelsManager.scheduleLoadLabelsFromOpenDoc()
setTimeout () =>
@editor.execCommand("startAutocomplete")
@ -144,7 +141,6 @@ define [
# and see if that contains a `\label{}`
if change.action == 'remove'
if _.any(change.lines, (line) -> line.match(/\\label{.*}/))
# console.log ">> a label has been removed"
@labelsManager.scheduleLoadLabelsFromOpenDoc()
monkeyPatchAutocomplete: () ->

View file

@ -25,7 +25,6 @@ define [
loadLabelsFromOpenDoc: () ->
docId = @ide.editorManager.getCurrentDocId()
# console.log ">> [LabelsMangager] loading labels", docId
docText = @ide.editorManager.getCurrentDocValue()
labels = []
re = /\\label{(.*)}/g
@ -33,16 +32,14 @@ define [
if labelMatch[1]
labels.push(labelMatch[1])
@state.documents[docId] = labels
# console.log ">> [LabelsMangager] success, loaded labels", docId, labels
scheduleLoadLabelsFromOpenDoc: () ->
if @loadLabelsTimeout
clearTimeout(@loadLabelsTimeout)
@loadLabelsTimeout = setTimeout(
(self) ->
# console.log ">> trigger timeout"
self.loadLabelsFromOpenDoc()
, 500
, 1000
, this
)