()
| 268 | }); |
| 269 | } |
| 270 | onInput() { |
| 271 | if (this.$onInputTimer) clearTimeout(this.$onInputTimer); |
| 272 | |
| 273 | var val1 = this.sessionA.doc.getAllLines(); |
| 274 | var val2 = this.sessionB.doc.getAllLines(); |
| 275 | |
| 276 | this.selectionRangeA = null; |
| 277 | this.selectionRangeB = null; |
| 278 | |
| 279 | var chunks = this.$diffLines(val1, val2); |
| 280 | |
| 281 | this.diffSession.chunks = this.chunks = chunks; |
| 282 | this.gutterDecoratorA && this.gutterDecoratorA.setDecorations(chunks); |
| 283 | this.gutterDecoratorB && this.gutterDecoratorB.setDecorations(chunks); |
| 284 | // if we"re dealing with too many chunks, fail silently |
| 285 | if (this.chunks && this.chunks.length > this.$maxDiffs) { |
| 286 | return; |
| 287 | } |
| 288 | |
| 289 | this.align(); |
| 290 | |
| 291 | this.editorA && this.editorA.renderer.updateBackMarkers(); |
| 292 | this.editorB && this.editorB.renderer.updateBackMarkers(); |
| 293 | |
| 294 | setTimeout(() => { |
| 295 | this.updateScrollBarDecorators(); |
| 296 | }, 0); |
| 297 | |
| 298 | if (this.$foldUnchangedOnInput) { |
| 299 | this.foldUnchanged(); |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | setupScrollbars() { |
| 304 | /** |
no test coverage detected