From b32b8b40fead580dd045c10c024e70593bdf6ef6 Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Tue, 16 Aug 2016 16:43:16 -0500 Subject: [PATCH 01/13] Adds configuration option for large file warning threshold. --- src/config-schema.coffee | 4 ++++ src/workspace.coffee | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config-schema.coffee b/src/config-schema.coffee index dd659687c..e240a6dce 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -122,6 +122,10 @@ module.exports = {value: 'no', description: 'Do not send any telemetry data'} {value: 'undecided', description: 'Undecided (Atom will ask again next time it is launched)'} ] + warnOnLargeFileLimit: + description: 'Warn before opening files larger than this number of megabytes.' + type: 'number' + default: 20 editor: type: 'object' properties: diff --git a/src/workspace.coffee b/src/workspace.coffee index d49fe7d69..d2bad9156 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -550,7 +550,7 @@ class Workspace extends Model fileSize = fs.getSizeSync(filePath) largeFileMode = fileSize >= 2 * 1048576 # 2MB - if fileSize >= 20 * 1048576 # 20MB + if fileSize >= @config.get('core.warnOnLargeFileLimit') * 1048576 # 20MB by default choice = @applicationDelegate.confirm message: 'Atom will be unresponsive during the loading of very large files.' detailedMessage: "Do you still want to load this file?" From 5a1def03ac5f5e9a865ff124ad07a7e02da1bc5a Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Wed, 17 Aug 2016 13:37:36 -0500 Subject: [PATCH 02/13] Updates spec for configurable large file limit. --- spec/workspace-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index fefcafffb..0982f4c8f 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -432,9 +432,9 @@ describe "Workspace", -> runs -> expect(editor.largeFileMode).toBe true - describe "when the file is over 20MB", -> + describe "when the file is over user-defined limit", -> it "prompts the user to make sure they want to open a file this big", -> - spyOn(fs, 'getSizeSync').andReturn 20 * 1048577 # 20MB + spyOn(fs, 'getSizeSync').andReturn atom.config.get('core.warnOnLargeFileLimit') * 1048577 # 20MB atom.applicationDelegate.confirm.andCallFake -> selectedButtonIndex atom.applicationDelegate.confirm() selectedButtonIndex = 1 # cancel From 324bf649eab3927f59cc31dec293ab5a38f3abb2 Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Wed, 17 Aug 2016 15:14:22 -0500 Subject: [PATCH 03/13] Improves specs for configurable large file limit. --- spec/workspace-spec.coffee | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index 0982f4c8f..3625a56e3 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -433,30 +433,36 @@ describe "Workspace", -> expect(editor.largeFileMode).toBe true describe "when the file is over user-defined limit", -> - it "prompts the user to make sure they want to open a file this big", -> - spyOn(fs, 'getSizeSync').andReturn atom.config.get('core.warnOnLargeFileLimit') * 1048577 # 20MB + test = (size, shouldPrompt) -> + spyOn(fs, 'getSizeSync').andReturn size * 1048577 atom.applicationDelegate.confirm.andCallFake -> selectedButtonIndex atom.applicationDelegate.confirm() - selectedButtonIndex = 1 # cancel - editor = null waitsForPromise -> workspace.open('sample.js').then (e) -> editor = e + if shouldPrompt + runs -> + expect(editor).toBeUndefined() + expect(atom.applicationDelegate.confirm).toHaveBeenCalled() - runs -> - expect(editor).toBeUndefined() - expect(atom.applicationDelegate.confirm).toHaveBeenCalled() + atom.applicationDelegate.confirm.reset() + selectedButtonIndex = 0 # open the file - atom.applicationDelegate.confirm.reset() - selectedButtonIndex = 0 # open the file - - waitsForPromise -> - workspace.open('sample.js').then (e) -> editor = e + waitsForPromise -> + workspace.open('sample.js').then (e) -> editor = e runs -> expect(atom.applicationDelegate.confirm).toHaveBeenCalled() expect(editor.largeFileMode).toBe true - + it "prompts the user to make sure they want to open a file this big", -> + atom.config.set "core.warnOnLargeFileLimit", 20 + test 20, true + it "doesn't prompt on files below the limit", -> + atom.config.set "core.warnOnLargeFileLimit", 30 + test 20, false + it "prompts for smaller files with a lower limit", -> + atom.config.set "core.warnOnLargeFileLimit", 5 + test 10, true describe "when passed a path that matches a custom opener", -> it "returns the resource returned by the custom opener", -> fooOpener = (pathToOpen, options) -> {foo: pathToOpen, options} if pathToOpen?.match(/\.foo/) From 7be9ff527fe5698f4af39d4f9224c0e2f18d9b65 Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Wed, 17 Aug 2016 17:36:54 -0500 Subject: [PATCH 04/13] :art: Improves customizable-size-warning spec styling. --- spec/workspace-spec.coffee | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index 3625a56e3..9d48d34b7 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -433,7 +433,7 @@ describe "Workspace", -> expect(editor.largeFileMode).toBe true describe "when the file is over user-defined limit", -> - test = (size, shouldPrompt) -> + shouldPromptForFileOfSize = (size, shouldPrompt) -> spyOn(fs, 'getSizeSync').andReturn size * 1048577 atom.applicationDelegate.confirm.andCallFake -> selectedButtonIndex atom.applicationDelegate.confirm() @@ -454,15 +454,19 @@ describe "Workspace", -> runs -> expect(atom.applicationDelegate.confirm).toHaveBeenCalled() expect(editor.largeFileMode).toBe true + it "prompts the user to make sure they want to open a file this big", -> atom.config.set "core.warnOnLargeFileLimit", 20 - test 20, true + shouldPromptForFileOfSize 20, true + it "doesn't prompt on files below the limit", -> atom.config.set "core.warnOnLargeFileLimit", 30 - test 20, false + shouldPromptForFileOfSize 20, false + it "prompts for smaller files with a lower limit", -> atom.config.set "core.warnOnLargeFileLimit", 5 - test 10, true + shouldPromptForFileOfSize 10, true + describe "when passed a path that matches a custom opener", -> it "returns the resource returned by the custom opener", -> fooOpener = (pathToOpen, options) -> {foo: pathToOpen, options} if pathToOpen?.match(/\.foo/) From 05602a85ffb04895b987df61217aff4fad20b6c2 Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Wed, 17 Aug 2016 18:11:24 -0500 Subject: [PATCH 05/13] :green_heart: Fixes tests for configurable large-file-warning. --- spec/workspace-spec.coffee | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index 9d48d34b7..1d60ce03a 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -451,9 +451,13 @@ describe "Workspace", -> waitsForPromise -> workspace.open('sample.js').then (e) -> editor = e - runs -> - expect(atom.applicationDelegate.confirm).toHaveBeenCalled() - expect(editor.largeFileMode).toBe true + runs -> + expect(atom.applicationDelegate.confirm).toHaveBeenCalled() + expect(editor.largeFileMode).toBe true + else + runs -> + expect(atom.applicationDelegate.confirm).not.toHaveBeenCalled() + expect(editor).not.toBeUndefined() it "prompts the user to make sure they want to open a file this big", -> atom.config.set "core.warnOnLargeFileLimit", 20 From bf839ab15e6f5907fca462ae684c3b6e20074c7b Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 17 Aug 2016 16:57:35 -0700 Subject: [PATCH 06/13] Reset display layer upon deserializing a text editor --- src/text-editor.coffee | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 420bee702..92b7d3e12 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -164,7 +164,8 @@ class TextEditor extends Model @tokenizedBuffer ?= new TokenizedBuffer({ grammar, tabLength, @buffer, @largeFileMode, @assert }) - @displayLayer ?= @buffer.addDisplayLayer({ + + displayLayerParams = { invisibles: @getInvisibles(), softWrapColumn: @getSoftWrapColumn(), showIndentGuides: not @isMini() and @doesShowIndentGuide(), @@ -174,7 +175,13 @@ class TextEditor extends Model isWrapBoundary: isWrapBoundary, foldCharacter: ZERO_WIDTH_NBSP, softWrapHangingIndent: @getSoftWrapHangingIndentLength() - }) + } + + if @displayLayer? + @displayLayer.reset(displayLayerParams) + else + @displayLayer = @buffer.addDisplayLayer(displayLayerParams) + @displayLayer.setTextDecorationLayer(@tokenizedBuffer) @defaultMarkerLayer = @displayLayer.addMarkerLayer() @selectionsMarkerLayer ?= @addMarkerLayer(maintainHistory: true, persistent: true) From 90b699f5cc4b322aea9417f65d3534996a83e82d Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 18 Aug 2016 10:40:16 -0700 Subject: [PATCH 07/13] Remove some text editor ivars that are redundant w/ display layer properties --- spec/text-editor-spec.coffee | 14 ++++++++++++-- src/text-editor.coffee | 25 ++++++++++++------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index e352a6c88..86642bd7b 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -3,6 +3,7 @@ path = require 'path' temp = require 'temp' clipboard = require '../src/safe-clipboard' TextEditor = require '../src/text-editor' +TextBuffer = require 'text-buffer' describe "TextEditor", -> [buffer, editor, lineLengths] = [] @@ -41,7 +42,7 @@ describe "TextEditor", -> it "restores the editor's layout configuration", -> editor.update({ softTabs: true - atomicSoftTabs: true + atomicSoftTabs: false tabLength: 12 softWrapped: true softWrapAtPreferredLineLength: true @@ -51,7 +52,16 @@ describe "TextEditor", -> editorWidthInChars: 120 }) - editor2 = TextEditor.deserialize(editor.serialize(), atom) + # Force buffer and display layer to be deserialized as well, rather than + # reusing the same buffer instance + editor2 = TextEditor.deserialize(editor.serialize(), { + assert: atom.assert, + clipboard: atom.clipboard, + textEditors: atom.textEditors, + project: { + bufferForIdSync: (id) -> TextBuffer.deserialize(editor.buffer.serialize()) + } + }) expect(editor2.getSoftTabs()).toBe(editor.getSoftTabs()) expect(editor2.hasAtomicSoftTabs()).toBe(editor.hasAtomicSoftTabs()) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 92b7d3e12..dfa4cc1be 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -128,7 +128,7 @@ class TextEditor extends Model @softWrapped, @decorationManager, @selectionsMarkerLayer, @buffer, suppressCursorCreation, @mini, @placeholderText, lineNumberGutterVisible, @largeFileMode, @clipboard, @assert, grammar, @showInvisibles, @autoHeight, @autoWidth, @scrollPastEnd, @editorWidthInChars, - @tokenizedBuffer, @displayLayer, @invisibles, @showIndentGuide, @softWrapHangingIndentLength, + @tokenizedBuffer, @displayLayer, @invisibles, @showIndentGuide, @softWrapped, @softWrapAtPreferredLineLength, @preferredLineLength } = params @@ -156,7 +156,6 @@ class TextEditor extends Model @undoGroupingInterval ?= 300 @nonWordCharacters ?= "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-…" @softWrapped ?= false - @softWrapHangingIndentLength ?= 0 @softWrapAtPreferredLineLength ?= false @preferredLineLength ?= 80 @@ -169,12 +168,12 @@ class TextEditor extends Model invisibles: @getInvisibles(), softWrapColumn: @getSoftWrapColumn(), showIndentGuides: not @isMini() and @doesShowIndentGuide(), - atomicSoftTabs: @hasAtomicSoftTabs(), - tabLength: @getTabLength(), + atomicSoftTabs: params.atomicSoftTabs ? true, + tabLength: tabLength, ratioForCharacter: @ratioForCharacter.bind(this), isWrapBoundary: isWrapBoundary, foldCharacter: ZERO_WIDTH_NBSP, - softWrapHangingIndent: @getSoftWrapHangingIndentLength() + softWrapHangingIndent: params.softWrapHangingIndentLength ? 0 } if @displayLayer? @@ -238,8 +237,7 @@ class TextEditor extends Model @softTabs = value when 'atomicSoftTabs' - if value isnt @atomicSoftTabs - @atomicSoftTabs = value + if value isnt @displayLayer.atomicSoftTabs displayLayerParams.atomicSoftTabs = value when 'tabLength' @@ -254,8 +252,7 @@ class TextEditor extends Model @emitter.emit 'did-change-soft-wrapped', @isSoftWrapped() when 'softWrapHangingIndentLength' - if value isnt @softWrapHangingIndentLength - @softWrapHangingIndentLength = value + if value isnt @displayLayer.softWrapHangingIndent displayLayerParams.softWrapHangingIndent = value when 'softWrapAtPreferredLineLength' @@ -360,8 +357,10 @@ class TextEditor extends Model firstVisibleScreenRow: @getFirstVisibleScreenRow() firstVisibleScreenColumn: @getFirstVisibleScreenColumn() - @id, @softTabs, @atomicSoftTabs, @tabLength, @softWrapped, - @softWrapHangingIndentLength, @softWrapAtPreferredLineLength, + atomicSoftTabs: @displayLayer.atomicSoftTabs + softWrapHangingIndentLength: @displayLayer.softWrapHangingIndent + + @id, @softTabs, @tabLength, @softWrapped, @softWrapAtPreferredLineLength, @preferredLineLength, @mini, @editorWidthInChars, @width, @largeFileMode, @registered, @invisibles, @showInvisibles, @showIndentGuide } @@ -2825,7 +2824,7 @@ class TextEditor extends Model setSoftTabs: (@softTabs) -> @update({softTabs}) # Returns a {Boolean} indicating whether atomic soft tabs are enabled for this editor. - hasAtomicSoftTabs: -> @atomicSoftTabs + hasAtomicSoftTabs: -> @displayLayer.atomicSoftTabs # Essential: Toggle soft tabs for this editor toggleSoftTabs: -> @setSoftTabs(not @getSoftTabs()) @@ -2852,7 +2851,7 @@ class TextEditor extends Model doesShowIndentGuide: -> @showIndentGuide and not @mini - getSoftWrapHangingIndentLength: -> @softWrapHangingIndentLength + getSoftWrapHangingIndentLength: -> @displayLayer.softWrapHangingIndent # Extended: Determine if the buffer uses hard or soft tabs. # From 10b3cbc00c6858531a7294e571ce34b159cfc37d Mon Sep 17 00:00:00 2001 From: Nathaniel Ringo Date: Thu, 18 Aug 2016 14:54:23 -0500 Subject: [PATCH 08/13] :green_heart: Hopefully fixes configurable-filesize-warning limit specs. --- spec/workspace-spec.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index 1d60ce03a..a9d984049 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -437,6 +437,8 @@ describe "Workspace", -> spyOn(fs, 'getSizeSync').andReturn size * 1048577 atom.applicationDelegate.confirm.andCallFake -> selectedButtonIndex atom.applicationDelegate.confirm() + selectedButtonIndex = 1 # cancel + editor = null waitsForPromise -> workspace.open('sample.js').then (e) -> editor = e @@ -456,7 +458,6 @@ describe "Workspace", -> expect(editor.largeFileMode).toBe true else runs -> - expect(atom.applicationDelegate.confirm).not.toHaveBeenCalled() expect(editor).not.toBeUndefined() it "prompts the user to make sure they want to open a file this big", -> From 26c9e5ee788af35d6adf105b39aa941a6e4200b6 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 18 Aug 2016 17:06:26 -0700 Subject: [PATCH 09/13] Set editor's tokenized buffer's tab length on its display layer when deserializing --- spec/text-editor-spec.coffee | 1 + src/text-editor.coffee | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 86642bd7b..329a7b692 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -70,6 +70,7 @@ describe "TextEditor", -> expect(editor2.getSoftWrapHangingIndentLength()).toBe(editor.getSoftWrapHangingIndentLength()) expect(editor2.getInvisibles()).toEqual(editor.getInvisibles()) expect(editor2.getEditorWidthInChars()).toBe(editor.getEditorWidthInChars()) + expect(editor2.displayLayer.tabLength).toBe(editor2.getTabLength()) describe "when the editor is constructed with the largeFileMode option set to true", -> it "loads the editor but doesn't tokenize", -> diff --git a/src/text-editor.coffee b/src/text-editor.coffee index dfa4cc1be..62c999da8 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -102,6 +102,7 @@ class TextEditor extends Model try state.tokenizedBuffer = TokenizedBuffer.deserialize(state.tokenizedBuffer, atomEnvironment) + state.tabLength = state.tokenizedBuffer.getTabLength() catch error if error.syscall is 'read' return # Error reading the file, don't deserialize an editor for it @@ -360,7 +361,7 @@ class TextEditor extends Model atomicSoftTabs: @displayLayer.atomicSoftTabs softWrapHangingIndentLength: @displayLayer.softWrapHangingIndent - @id, @softTabs, @tabLength, @softWrapped, @softWrapAtPreferredLineLength, + @id, @softTabs, @softWrapped, @softWrapAtPreferredLineLength, @preferredLineLength, @mini, @editorWidthInChars, @width, @largeFileMode, @registered, @invisibles, @showInvisibles, @showIndentGuide } @@ -701,8 +702,9 @@ class TextEditor extends Model selectionsMarkerLayer = displayLayer.getMarkerLayer(@buffer.getMarkerLayer(@selectionsMarkerLayer.id).copy().id) softTabs = @getSoftTabs() new TextEditor({ - @buffer, selectionsMarkerLayer, @tabLength, softTabs, + @buffer, selectionsMarkerLayer, softTabs, suppressCursorCreation: true, + tabLength: @tokenizedBuffer.getTabLength(), @firstVisibleScreenRow, @firstVisibleScreenColumn, @clipboard, @assert, displayLayer, grammar: @getGrammar() }) From fd29f96af980954c91f137af3c709f5c7e6b616a Mon Sep 17 00:00:00 2001 From: Matthew Dapena-Tretter Date: Mon, 15 Aug 2016 15:51:52 -0700 Subject: [PATCH 10/13] Serialize active pane item using index instead of URI --- spec/pane-spec.coffee | 14 ++++++++++++++ src/pane.coffee | 20 +++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index 8abbb0ece..bfd5b2115 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -1119,6 +1119,20 @@ describe "Pane", -> newPane = Pane.deserialize(pane.serialize(), atom) expect(newPane.getActiveItem()).toEqual newPane.itemAtIndex(1) + it "restores the active item when it doesn't implement getURI()", -> + pane.items[1].getURI = null + pane.activateItemAtIndex(1) + newPane = Pane.deserialize(pane.serialize(), atom) + expect(newPane.getActiveItem()).toEqual newPane.itemAtIndex(1) + + it "restores the correct item when it doesn't implement getURI() and some items weren't deserialized", -> + unserializable = {} + pane.addItem(unserializable, 0); + pane.items[2].getURI = null + pane.activateItemAtIndex(2) + newPane = Pane.deserialize(pane.serialize(), atom) + expect(newPane.getActiveItem()).toEqual newPane.itemAtIndex(1) + it "does not include items that cannot be deserialized", -> spyOn(console, 'warn') unserializable = {} diff --git a/src/pane.coffee b/src/pane.coffee index add6a365b..f7487a6e1 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -21,13 +21,16 @@ class Pane extends Model focused: false @deserialize: (state, {deserializers, applicationDelegate, config, notifications}) -> - {items, itemStackIndices, activeItemURI, activeItemUri} = state + {items, itemStackIndices, activeItemIndex, activeItemURI, activeItemUri} = state activeItemURI ?= activeItemUri - state.items = compact(items.map (itemState) -> deserializers.deserialize(itemState)) - state.activeItem = find state.items, (item) -> - if typeof item.getURI is 'function' - itemURI = item.getURI() - itemURI is activeItemURI + items = items.map (itemState) -> deserializers.deserialize(itemState) + state.activeItem = items[activeItemIndex] + state.items = compact(items) + if activeItemURI? + state.activeItem ?= find state.items, (item) -> + if typeof item.getURI is 'function' + itemURI = item.getURI() + itemURI is activeItemURI new Pane(extend(state, { deserializerManager: deserializers, notificationManager: notifications, @@ -53,16 +56,15 @@ class Pane extends Model @setFlexScale(params?.flexScale ? 1) serialize: -> - if typeof @activeItem?.getURI is 'function' - activeItemURI = @activeItem.getURI() itemsToBeSerialized = compact(@items.map((item) -> item if typeof item.serialize is 'function')) itemStackIndices = (itemsToBeSerialized.indexOf(item) for item in @itemStack when typeof item.serialize is 'function') + activeItemIndex = itemsToBeSerialized.indexOf(@activeItem) deserializer: 'Pane' id: @id items: itemsToBeSerialized.map((item) -> item.serialize()) itemStackIndices: itemStackIndices - activeItemURI: activeItemURI + activeItemIndex: activeItemIndex focused: @focused flexScale: @flexScale From 4b68e2f411e1b76cc7e0ff89efb5358bdf7a1e82 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 17 Aug 2016 02:54:47 -0600 Subject: [PATCH 11/13] Remove trailing semicolon --- spec/pane-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index bfd5b2115..58702c425 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -1127,7 +1127,7 @@ describe "Pane", -> it "restores the correct item when it doesn't implement getURI() and some items weren't deserialized", -> unserializable = {} - pane.addItem(unserializable, 0); + pane.addItem(unserializable, 0) pane.items[2].getURI = null pane.activateItemAtIndex(2) newPane = Pane.deserialize(pane.serialize(), atom) From 98fb29800ace96346df460ff5a5d121e8ab59112 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 19 Aug 2016 12:40:28 +0200 Subject: [PATCH 12/13] Don't use deprecate API in tests --- spec/pane-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index 58702c425..ac4d502b9 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -1127,7 +1127,7 @@ describe "Pane", -> it "restores the correct item when it doesn't implement getURI() and some items weren't deserialized", -> unserializable = {} - pane.addItem(unserializable, 0) + pane.addItem(unserializable, {index: 0}) pane.items[2].getURI = null pane.activateItemAtIndex(2) newPane = Pane.deserialize(pane.serialize(), atom) From 7c73ac002e1bc9129f6850522cafe32ddf1b8be8 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 19 Aug 2016 13:07:54 +0200 Subject: [PATCH 13/13] :arrow_up: spell-check --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 348b1f878..4f00610bb 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "package-generator": "1.0.0", "settings-view": "0.241.2", "snippets": "1.0.2", - "spell-check": "0.67.1", + "spell-check": "0.68.0", "status-bar": "1.4.1", "styleguide": "0.47.0", "symbols-view": "0.113.1",