From a5c6b492789f2469a2c688fcaa4a4580684a411e Mon Sep 17 00:00:00 2001 From: guidezpl <guidezpl@users.noreply.github.com> Date: Sun, 5 May 2019 15:03:13 -0400 Subject: [PATCH] remove ; --- lib/git-scroll-marker-binding.js | 46 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/git-scroll-marker-binding.js b/lib/git-scroll-marker-binding.js index e04cd26..5aa04d4 100644 --- a/lib/git-scroll-marker-binding.js +++ b/lib/git-scroll-marker-binding.js @@ -1,20 +1,20 @@ -'use babel'; +'use babel' -import { CompositeDisposable } from 'atom'; -import { repositoryForPath } from './helpers'; +import { CompositeDisposable } from 'atom' +import { repositoryForPath } from './helpers' -const MAX_BUFFER_LENGTH_TO_DIFF = 2 * 1024 * 1024; +const MAX_BUFFER_LENGTH_TO_DIFF = 2 * 1024 * 1024 export default class GitScrollMarkerBinding { constructor(editor, scrollMarkerAPI) { - if (!editor) return console.warn('git-scroll-marker binding created without an editor'); - if (!scrollMarkerAPI) throw Error('git-scroll-marker binding created without scrollMarkerAPI'); + if (!editor) return console.warn('git-scroll-marker binding created without an editor') + if (!scrollMarkerAPI) throw Error('git-scroll-marker binding created without scrollMarkerAPI') - this.editor = editor; - this.addLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-add", "#43d08a"); - this.editLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-edit", "#e0c285"); - this.removeLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-remove", "#e05252"); - this.subscriptions = new CompositeDisposable(); + this.editor = editor + this.addLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-add", "#43d08a") + this.editLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-edit", "#e0c285") + this.removeLayer = scrollMarkerAPI.getLayer(this.editor, "git-marker-layer-remove", "#e05252") + this.subscriptions = new CompositeDisposable() this.updateDiffs = this.updateDiffs.bind(this) } @@ -54,7 +54,7 @@ export default class GitScrollMarkerBinding { } updateDiffs() { - console.log('updateDiffs'); + console.log('updateDiffs') if (this.editor.isDestroyed()) return const path = this.editor && this.editor.getPath() if ( @@ -74,34 +74,34 @@ export default class GitScrollMarkerBinding { const endRow = newStart + newLines - 1 if (oldLines === 0 && newLines > 0) { for (let row = startRow; row <= endRow; row++) { - this.addLayer.addMarker(row); + this.addLayer.addMarker(row) } } else if (newLines === 0 && oldLines > 0) { if (startRow < 0) { - this.removeLayer.addMarker(0); + this.removeLayer.addMarker(0) } else { - this.removeLayer.addMarker(startRow); + this.removeLayer.addMarker(startRow) } } else { for (let row = startRow; row <= endRow; row++) { - this.editLayer.addMarker(row); + this.editLayer.addMarker(row) } } } } removeDecorations() { - this.addLayer.clear(); - this.editLayer.clear(); - this.removeLayer.clear(); + this.addLayer.clear() + this.editLayer.clear() + this.removeLayer.clear() } cancelUpdate() { - clearImmediate(this.immediateId); + clearImmediate(this.immediateId) } scheduleUpdate(editor) { - this.cancelUpdate(); - this.immediateId = setImmediate(this.updateDiffs); + this.cancelUpdate() + this.immediateId = setImmediate(this.updateDiffs) } -}; +}