Merge pull request #16455 from fordhurley/fix-unique-editor-ids

Ensure that new editors get unique ids
This commit is contained in:
Max Brunsfeld
2017-12-27 14:43:40 -08:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@@ -119,6 +119,10 @@ class TextEditor {
}
this.id = params.id != null ? params.id : nextId++
if (this.id >= nextId) {
// Ensure that new editors get unique ids:
nextId = this.id + 1
}
this.initialScrollTopRow = params.initialScrollTopRow
this.initialScrollLeftColumn = params.initialScrollLeftColumn
this.decorationManager = params.decorationManager