From d3a6e794283fb6f574855449dff273c542e767d9 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 13:54:22 -0700 Subject: [PATCH 01/53] The horizontal scrollbar takes gutter width into account --- src/editor-component.coffee | 4 +++- src/gutter-component.coffee | 6 +++--- src/scrollbar-component.coffee | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 120616249..ae42ef4a4 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -138,8 +138,9 @@ EditorComponent = React.createClass className: 'horizontal-scrollbar' orientation: 'horizontal' onScroll: @onHorizontalScroll + gutterWidth: @gutterWidth scrollLeft: scrollLeft - scrollWidth: scrollWidth + @gutterWidth + scrollWidth: scrollWidth visible: horizontallyScrollable and not @refreshingScrollbars and not @measuringScrollbars scrollableInOppositeDirection: verticallyScrollable verticalScrollbarWidth: verticalScrollbarWidth @@ -668,6 +669,7 @@ EditorComponent = React.createClass editor.setSelectedScreenRange([tailPosition, [dragRow + 1, 0]]) onStylesheetsChanged: (stylesheet) -> + @refs.gutter.measureWidth() @refreshScrollbars() if @containsScrollbarSelector(stylesheet) @remeasureCharacterWidthsIfVisibleAfterNextUpdate = true @requestUpdate() if @visible diff --git a/src/gutter-component.coffee b/src/gutter-component.coffee index ae2e9f9f2..19fd6b4d4 100644 --- a/src/gutter-component.coffee +++ b/src/gutter-component.coffee @@ -63,12 +63,12 @@ GutterComponent = React.createClass @updateDummyLineNumber() @removeLineNumberNodes() - unless isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'defaultCharWidth') - @measureWidth() - @clearScreenRowCaches() unless oldProps.lineHeightInPixels is @props.lineHeightInPixels @updateLineNumbers() + unless isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'defaultCharWidth') + @measureWidth() + clearScreenRowCaches: -> @lineNumberIdsByScreenRow = {} @screenRowsByLineNumberId = {} diff --git a/src/scrollbar-component.coffee b/src/scrollbar-component.coffee index 88f1beec3..ba284e0a0 100644 --- a/src/scrollbar-component.coffee +++ b/src/scrollbar-component.coffee @@ -7,7 +7,7 @@ ScrollbarComponent = React.createClass displayName: 'ScrollbarComponent' render: -> - {orientation, className, scrollHeight, scrollWidth, visible} = @props + {orientation, className, scrollHeight, scrollWidth, gutterWidth, visible} = @props {scrollableInOppositeDirection, horizontalScrollbarHeight, verticalScrollbarWidth} = @props style = {} @@ -19,6 +19,7 @@ ScrollbarComponent = React.createClass when 'horizontal' style.height = horizontalScrollbarHeight style.right = verticalScrollbarWidth if scrollableInOppositeDirection + style.left = gutterWidth div {className, style, @onScroll}, switch orientation @@ -40,7 +41,7 @@ ScrollbarComponent = React.createClass when 'vertical' not isEqualForProperties(newProps, @props, 'scrollHeight', 'scrollTop', 'scrollableInOppositeDirection') when 'horizontal' - not isEqualForProperties(newProps, @props, 'scrollWidth', 'scrollLeft', 'scrollableInOppositeDirection') + not isEqualForProperties(newProps, @props, 'scrollWidth', 'scrollLeft', 'gutterWidth', 'scrollableInOppositeDirection') componentDidUpdate: -> {orientation, scrollTop, scrollLeft} = @props From 0f1d1556851dc8e74aa9278830c0b6ee08d1d1d0 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 15:21:41 -0700 Subject: [PATCH 02/53] Move gutterWidth into state; add specs for scrollbar position --- spec/editor-component-spec.coffee | 22 +++++++++++++++++++++- src/editor-component.coffee | 25 ++++++++++++++++++------- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 3d8af165f..dffcb36c9 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1565,7 +1565,27 @@ describe "EditorComponent", -> component.measureHeightAndWidth() runSetImmediateCallbacks() - expect(horizontalScrollbarNode.scrollWidth).toBe gutterNode.offsetWidth + editor.getScrollWidth() + expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() + expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' + + it "updates the position and width of the horizontal scrollbar when editor.showLineNumbers is toggled", -> + componentNode.style.width = 10 * charWidth + 'px' + component.measureHeightAndWidth() + runSetImmediateCallbacks() + + gutterNode = componentNode.querySelector('.gutter') + expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() + expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' + + atom.config.set("editor.showLineNumbers", false) + gutterNode = componentNode.querySelector('.gutter') + expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() + expect(horizontalScrollbarNode.style.left).toBe '0px' + + atom.config.set("editor.showLineNumbers", true) + gutterNode = componentNode.querySelector('.gutter') + expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() + expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' describe "mousewheel events", -> beforeEach -> diff --git a/src/editor-component.coffee b/src/editor-component.coffee index ae42ef4a4..302da62de 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -34,7 +34,6 @@ EditorComponent = React.createClass selectionChanged: false selectionAdded: false scrollingVertically: false - gutterWidth: 0 refreshingScrollbars: false measuringScrollbars: true mouseWheelScreenRow: null @@ -50,7 +49,7 @@ EditorComponent = React.createClass domPollingPaused: false render: -> - {focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, showLineNumbers, visible} = @state + {focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, showLineNumbers, visible, gutterWidth} = @state {editor, mini, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props maxLineNumberDigits = editor.getLineCount().toString().length invisibles = if showInvisibles and not mini then @state.invisibles else {} @@ -138,7 +137,7 @@ EditorComponent = React.createClass className: 'horizontal-scrollbar' orientation: 'horizontal' onScroll: @onHorizontalScroll - gutterWidth: @gutterWidth + gutterWidth: gutterWidth scrollLeft: scrollLeft scrollWidth: scrollWidth visible: horizontallyScrollable and not @refreshingScrollbars and not @measuringScrollbars @@ -158,7 +157,8 @@ EditorComponent = React.createClass {editor} = @props Math.max(1, Math.ceil(editor.getHeight() / editor.getLineHeightInPixels())) - getInitialState: -> {} + getInitialState: -> + gutterWidth: 0 getDefaultProps: -> cursorBlinkPeriod: 800 @@ -213,6 +213,10 @@ EditorComponent = React.createClass @measureLineHeightAndDefaultCharWidthIfNeeded(prevState) @remeasureCharacterWidthsIfNeeded(prevState) + if @gutterVisibilityChanged and @visible + @gutterVisibilityChanged = false + @measureGutter() + performInitialMeasurement: -> @updatesPaused = true @measureLineHeightAndDefaultCharWidth() @@ -669,7 +673,7 @@ EditorComponent = React.createClass editor.setSelectedScreenRange([tailPosition, [dragRow + 1, 0]]) onStylesheetsChanged: (stylesheet) -> - @refs.gutter.measureWidth() + @measureGutter() @refreshScrollbars() if @containsScrollbarSelector(stylesheet) @remeasureCharacterWidthsIfVisibleAfterNextUpdate = true @requestUpdate() if @visible @@ -781,6 +785,12 @@ EditorComponent = React.createClass @heightAndWidthMeasurementRequested = false @measureHeightAndWidth() + measureGutter: -> + if @refs.gutter? + @refs.gutter?.measureWidth() + else + @onGutterWidthChanged(0) + # Measure explicitly-styled height and width and relay them to the model. If # these values aren't explicitly styled, we assume the editor is unconstrained # and use the scrollHeight / scrollWidth as its height and width in @@ -836,8 +846,8 @@ EditorComponent = React.createClass remeasureCharacterWidths: -> @refs.lines.remeasureCharacterWidths() - onGutterWidthChanged: (@gutterWidth) -> - @requestUpdate() + onGutterWidthChanged: (gutterWidth) -> + @setState({gutterWidth}) measureScrollbars: -> return unless @visible @@ -935,6 +945,7 @@ EditorComponent = React.createClass @setState({showInvisibles}) setShowLineNumbers: (showLineNumbers) -> + @gutterVisibilityChanged = true @setState({showLineNumbers}) setScrollSensitivity: (scrollSensitivity) -> From 48a5123202291aef20cf61e162e947ae33f29d23 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 16:49:54 -0700 Subject: [PATCH 03/53] :lipstick: Move logic into measureGutterIfNeeded --- spec/editor-component-spec.coffee | 2 ++ src/editor-component.coffee | 36 ++++++++++++++++++------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index dffcb36c9..df378f12d 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1578,11 +1578,13 @@ describe "EditorComponent", -> expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' atom.config.set("editor.showLineNumbers", false) + runSetImmediateCallbacks() gutterNode = componentNode.querySelector('.gutter') expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() expect(horizontalScrollbarNode.style.left).toBe '0px' atom.config.set("editor.showLineNumbers", true) + runSetImmediateCallbacks() gutterNode = componentNode.querySelector('.gutter') expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 302da62de..2ec55da8c 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -24,6 +24,7 @@ EditorComponent = React.createClass visible: false autoHeight: false + gutterWidth: 0 pendingScrollTop: null pendingScrollLeft: null selectOnMouseMove: false @@ -49,7 +50,7 @@ EditorComponent = React.createClass domPollingPaused: false render: -> - {focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, showLineNumbers, visible, gutterWidth} = @state + {focused, fontSize, lineHeight, fontFamily, showIndentGuide, showInvisibles, showLineNumbers, visible} = @state {editor, mini, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props maxLineNumberDigits = editor.getLineCount().toString().length invisibles = if showInvisibles and not mini then @state.invisibles else {} @@ -137,7 +138,7 @@ EditorComponent = React.createClass className: 'horizontal-scrollbar' orientation: 'horizontal' onScroll: @onHorizontalScroll - gutterWidth: gutterWidth + gutterWidth: @gutterWidth scrollLeft: scrollLeft scrollWidth: scrollWidth visible: horizontallyScrollable and not @refreshingScrollbars and not @measuringScrollbars @@ -157,8 +158,7 @@ EditorComponent = React.createClass {editor} = @props Math.max(1, Math.ceil(editor.getHeight() / editor.getLineHeightInPixels())) - getInitialState: -> - gutterWidth: 0 + getInitialState: -> {} getDefaultProps: -> cursorBlinkPeriod: 800 @@ -213,9 +213,7 @@ EditorComponent = React.createClass @measureLineHeightAndDefaultCharWidthIfNeeded(prevState) @remeasureCharacterWidthsIfNeeded(prevState) - if @gutterVisibilityChanged and @visible - @gutterVisibilityChanged = false - @measureGutter() + @measureGutterIfNeeded() performInitialMeasurement: -> @updatesPaused = true @@ -785,12 +783,6 @@ EditorComponent = React.createClass @heightAndWidthMeasurementRequested = false @measureHeightAndWidth() - measureGutter: -> - if @refs.gutter? - @refs.gutter?.measureWidth() - else - @onGutterWidthChanged(0) - # Measure explicitly-styled height and width and relay them to the model. If # these values aren't explicitly styled, we assume the editor is unconstrained # and use the scrollHeight / scrollWidth as its height and width in @@ -847,7 +839,21 @@ EditorComponent = React.createClass @refs.lines.remeasureCharacterWidths() onGutterWidthChanged: (gutterWidth) -> - @setState({gutterWidth}) + if gutterWidth isnt @gutterWidth + @gutterWidth = gutterWidth + @requestUpdate() + + measureGutterIfNeeded: -> + if @visible and @measureGutterWhenEditorIsVisible + @measureGutterWhenEditorIsVisible = false + @measureGutter() + + measureGutter: -> + if @state.showLineNumbers + @refs.gutter.measureWidth() + else + @gutterWidth = 0 + @requestUpdate() measureScrollbars: -> return unless @visible @@ -945,7 +951,7 @@ EditorComponent = React.createClass @setState({showInvisibles}) setShowLineNumbers: (showLineNumbers) -> - @gutterVisibilityChanged = true + @measureGutterWhenEditorIsVisible = true @setState({showLineNumbers}) setScrollSensitivity: (scrollSensitivity) -> From 361f8ec77056b4b940209b96d0b1df3013f68e6f Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 17:17:30 -0700 Subject: [PATCH 04/53] Add specs for toggling the gutter when the editor is hidden --- spec/editor-component-spec.coffee | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index df378f12d..883049753 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1589,6 +1589,36 @@ describe "EditorComponent", -> expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' + describe "when the editor is hidden", -> + hideEditorView = -> + wrapperNode.style.display = 'none' + expect(component.isVisible()).toBe false + + showEditorView = -> + wrapperNode.style.display = 'block' + expect(component.isVisible()).toBe true + + it "updates the position of the horizontal scrollbar only when the editor is visible", -> + # toggling gutter off + hideEditorView() + atom.config.set("editor.showLineNumbers", false) + + showEditorView() + component.forceUpdate() + runSetImmediateCallbacks() + gutterNode = componentNode.querySelector('.gutter') + expect(horizontalScrollbarNode.style.left).toBe '0px' + + # toggling gutter back on + hideEditorView() + atom.config.set("editor.showLineNumbers", true) + + showEditorView() + component.forceUpdate() + runSetImmediateCallbacks() + gutterNode = componentNode.querySelector('.gutter') + expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' + describe "mousewheel events", -> beforeEach -> atom.config.set('editor.scrollSensitivity', 100) From c2042ad74ad3b878378ddddba157480e83f48e23 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 18:40:50 -0700 Subject: [PATCH 05/53] Upgrade to apm 0.82 --- apm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm/package.json b/apm/package.json index 959972e54..fc0e57c07 100644 --- a/apm/package.json +++ b/apm/package.json @@ -6,6 +6,6 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "atom-package-manager": "0.81.0" + "atom-package-manager": "0.82.0" } } From 119b446c3befd0aa330e7a2cfd807e9d2afaf00f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 20:31:15 -0700 Subject: [PATCH 06/53] Upgrade to language-c@0.23 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8870c8119..0be41d8d8 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "whitespace": "0.25.0", "wrap-guide": "0.21.0", - "language-c": "0.22.0", + "language-c": "0.23.0", "language-coffee-script": "0.27.0", "language-css": "0.17.0", "language-gfm": "0.43.0", From 2f47e8a4627fff221c801dc3ad6a2dc1604854c7 Mon Sep 17 00:00:00 2001 From: Darrell Sandstrom Date: Tue, 22 Jul 2014 22:48:27 -0700 Subject: [PATCH 07/53] Add key binding for select-line to linux and win keymaps --- keymaps/linux.cson | 1 + keymaps/win32.cson | 1 + 2 files changed, 2 insertions(+) diff --git a/keymaps/linux.cson b/keymaps/linux.cson index a092ff962..d643ff0bb 100644 --- a/keymaps/linux.cson +++ b/keymaps/linux.cson @@ -96,6 +96,7 @@ 'ctrl-alt-shift-p': 'editor:log-cursor-scope' 'ctrl-k ctrl-u': 'editor:upper-case' 'ctrl-k ctrl-l': 'editor:lower-case' + 'ctrl-l': 'editor:select-line' '.workspace .editor:not(.mini)': # Atom specific diff --git a/keymaps/win32.cson b/keymaps/win32.cson index 01408fb38..a97d29c2c 100644 --- a/keymaps/win32.cson +++ b/keymaps/win32.cson @@ -93,6 +93,7 @@ 'ctrl-alt-shift-p': 'editor:log-cursor-scope' 'ctrl-k ctrl-u': 'editor:upper-case' 'ctrl-k ctrl-l': 'editor:lower-case' + 'ctrl-l': 'editor:select-line' '.workspace .editor:not(.mini)': # Atom specific From f5f9de1bf861f5c4b360df679e3ce70bf21ee343 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 08:26:28 -0700 Subject: [PATCH 08/53] Upgrade to tabs@0.46 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0be41d8d8..18e6942cf 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "status-bar": "0.41.0", "styleguide": "0.29.0", "symbols-view": "0.60.0", - "tabs": "0.45.0", + "tabs": "0.46.0", "timecop": "0.21.0", "tree-view": "0.111.0", "update-package-dependencies": "0.6.0", From ffb041a1609a2145e9763f8d62df41d4b2b20b8f Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 23 Jul 2014 09:30:52 -0700 Subject: [PATCH 09/53] Only render an nbsp on empty lines when no eol character defined Fixes #3053 --- spec/editor-component-spec.coffee | 14 +++++++++++++- src/lines-component.coffee | 8 +++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 3d8af165f..7ddd70cf5 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -192,6 +192,10 @@ describe "EditorComponent", -> for lineNode in lineNodes expect(lineNode.style.width).toBe scrollViewWidth + 'px' + it "renders an nbsp on empty lines when no line-ending character is defined", -> + atom.config.set("editor.showInvisibles", false) + expect(component.lineNodeForScreenRow(10).textContent).toBe nbsp + describe "when showInvisibles is enabled", -> invisibles = null @@ -232,7 +236,15 @@ describe "EditorComponent", -> expect(component.lineNodeForScreenRow(0).textContent).toBe "a line that ends with a carriage return#{invisibles.cr}#{invisibles.eol}" it "renders invisible line-ending characters on empty lines", -> - expect(component.lineNodeForScreenRow(10).textContent).toBe nbsp + invisibles.eol + expect(component.lineNodeForScreenRow(10).textContent).toBe invisibles.eol + + it "renders an nbsp on empty lines when the line-ending character is an empty string", -> + atom.config.set("editor.invisibles", eol: '') + expect(component.lineNodeForScreenRow(10).textContent).toBe nbsp + + it "renders an nbsp on empty lines when no line-ending character is defined", -> + atom.config.set("editor.invisibles", eol: null) + expect(component.lineNodeForScreenRow(10).textContent).toBe nbsp it "interleaves invisible line-ending characters with indent guides on empty lines", -> component.setShowIndentGuide(true) diff --git a/src/lines-component.coffee b/src/lines-component.coffee index d1b1aba94..755e49429 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -181,7 +181,7 @@ LinesComponent = React.createClass lineHTML else - ' ' + @buildEndOfLineHTML(line, @props.invisibles) + @buildEndOfLineHTML(line, @props.invisibles) or ' ' buildLineInnerHTML: (line) -> {invisibles, mini, showIndentGuide, invisibles} = @props @@ -204,9 +204,11 @@ LinesComponent = React.createClass return '' if @props.mini or line.isSoftWrapped() html = '' - if invisibles.cr? and line.lineEnding is '\r\n' + # Note the lack of '?' in the character checks. A user can set the chars + # to an empty string which we will interpret as not-set + if invisibles.cr and line.lineEnding is '\r\n' html += "#{invisibles.cr}" - if invisibles.eol? + if invisibles.eol html += "#{invisibles.eol}" html From bd93f243dc56dca97e9cb0ab8f69be1b0d2d8b98 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:17:50 -0700 Subject: [PATCH 10/53] Filter out all test and tests folders Prevent all test/tests folders from ending up in the built app instead of an explicit and ever-growing list --- build/tasks/build-task.coffee | 30 +++++++++++++++--------------- build/tasks/task-helpers.coffee | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 21f59c4c0..1483f9ab5 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -45,21 +45,9 @@ module.exports = (grunt) -> path.join('git-utils', 'deps') path.join('oniguruma', 'deps') path.join('less', 'dist') - path.join('less', 'test') path.join('bootstrap', 'docs') path.join('bootstrap', 'examples') path.join('pegjs', 'examples') - path.join('plist', 'tests') - path.join('xmldom', 'test') - path.join('combined-stream', 'test') - path.join('delayed-stream', 'test') - path.join('domhandler', 'test') - path.join('fstream-ignore', 'test') - path.join('harmony-collections', 'test') - path.join('lru-cache', 'test') - path.join('minimatch', 'test') - path.join('normalize-package-data', 'test') - path.join('npm', 'test') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') path.join('build', 'Release', 'obj.target') @@ -79,17 +67,29 @@ module.exports = (grunt) -> if process.platform is 'darwin' ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries') ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})" + + testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}tests?#{_.escapeRegExp(path.sep)}") + nodeModulesFilter = new RegExp(ignoredPaths.join('|')) + filterNodeModule = (pathToCopy) -> + pathToCopy = path.resolve(pathToCopy) + nodeModulesFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) + packageFilter = new RegExp("(#{ignoredPaths.join('|')})|(.+\\.(cson|coffee)$)") + filterPackage = (pathToCopy) -> + pathToCopy = path.resolve(pathToCopy) + packageFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) + for directory in nonPackageDirectories - cp directory, path.join(appDir, directory), filter: nodeModulesFilter + cp directory, path.join(appDir, directory), filter: filterNodeModule + for directory in packageDirectories - cp directory, path.join(appDir, directory), filter: packageFilter + cp directory, path.join(appDir, directory), filter: filterPackage cp 'spec', path.join(appDir, 'spec') cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/ cp 'static', path.join(appDir, 'static') - cp 'apm', path.join(appDir, 'apm'), filter: nodeModulesFilter + cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule if process.platform is 'darwin' grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) -> diff --git a/build/tasks/task-helpers.coffee b/build/tasks/task-helpers.coffee index 4b388ce63..a25f9ea31 100644 --- a/build/tasks/task-helpers.coffee +++ b/build/tasks/task-helpers.coffee @@ -7,7 +7,7 @@ module.exports = (grunt) -> grunt.fatal("Cannot copy non-existent #{source.cyan} to #{destination.cyan}") copyFile = (sourcePath, destinationPath) -> - return if filter?.test(sourcePath) + return if filter?(sourcePath) or filter?.test?(sourcePath) stats = fs.lstatSync(sourcePath) if stats.isSymbolicLink() From c4d26f64054fd7bacac3eb55fe0b99900d5fb75f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:20:34 -0700 Subject: [PATCH 11/53] Filter example files from built app --- build/tasks/build-task.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 1483f9ab5..ea49706a6 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -69,16 +69,17 @@ module.exports = (grunt) -> ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})" testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}tests?#{_.escapeRegExp(path.sep)}") + exampleFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}examples?#{_.escapeRegExp(path.sep)}") nodeModulesFilter = new RegExp(ignoredPaths.join('|')) filterNodeModule = (pathToCopy) -> pathToCopy = path.resolve(pathToCopy) - nodeModulesFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) + nodeModulesFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy) packageFilter = new RegExp("(#{ignoredPaths.join('|')})|(.+\\.(cson|coffee)$)") filterPackage = (pathToCopy) -> pathToCopy = path.resolve(pathToCopy) - packageFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) + packageFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy) for directory in nonPackageDirectories cp directory, path.join(appDir, directory), filter: filterNodeModule @@ -108,4 +109,4 @@ module.exports = (grunt) -> dependencies = ['compile', "generate-license:save"] dependencies.push('copy-info-plist') if process.platform is 'darwin' dependencies.push('set-exe-icon') if process.platform is 'win32' - grunt.task.run(dependencies...) + # grunt.task.run(dependencies...) From 01499fe6747bb9e2f732e638444b161225eaf300 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:24:25 -0700 Subject: [PATCH 12/53] Uncomment grunt.task.run call --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index ea49706a6..b70374040 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -109,4 +109,4 @@ module.exports = (grunt) -> dependencies = ['compile', "generate-license:save"] dependencies.push('copy-info-plist') if process.platform is 'darwin' dependencies.push('set-exe-icon') if process.platform is 'win32' - # grunt.task.run(dependencies...) + grunt.task.run(dependencies...) From 4ff2429f71ad354673952fe633e7bd0683252d58 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:29:41 -0700 Subject: [PATCH 13/53] Don't include .cc files from native modules --- build/tasks/build-task.coffee | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index b70374040..310a58c1c 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -63,6 +63,17 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'vendor', 'hunspell') + path.sep)}.*" ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.*\\.pdb" + # Ignore *.cc files from native modules + ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('pathwatcher', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('runas', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.cc*" + # Hunspell dictionaries are only not needed on OS X. if process.platform is 'darwin' ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries') From 6c736ace1ab7944f8616df202d1fec731baed67b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:34:00 -0700 Subject: [PATCH 14/53] Don't include .h files from native modules --- build/tasks/build-task.coffee | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 310a58c1c..b55b9fd26 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -50,6 +50,7 @@ module.exports = (grunt) -> path.join('pegjs', 'examples') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') + path.join('nan', 'nan.h') path.join('build', 'Release', 'obj.target') path.join('build', 'Release', 'obj') path.join('build', 'Release', '.deps') @@ -64,15 +65,15 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.*\\.pdb" # Ignore *.cc files from native modules - ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('pathwatcher', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('runas', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.cc*" - ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.cc*" + ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('pathwatcher', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('runas', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.(cc|h)*" + ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.(cc|h)*" # Hunspell dictionaries are only not needed on OS X. if process.platform is 'darwin' From c551b58490bca9c4da37ccf8d50dbf7010b6825f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:36:02 -0700 Subject: [PATCH 15/53] Update comment with .h files --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index b55b9fd26..23c7765cf 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -64,7 +64,7 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'vendor', 'hunspell') + path.sep)}.*" ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.*\\.pdb" - # Ignore *.cc files from native modules + # Ignore *.cc and *.h files from native modules ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.(cc|h)*" From 17ceb3414064489f389f06d036d36679faf64868 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:37:19 -0700 Subject: [PATCH 16/53] Don't include jasmine-node/spec files --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 23c7765cf..cda3ba9e9 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -50,6 +50,7 @@ module.exports = (grunt) -> path.join('pegjs', 'examples') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') + path.join('jasmine-node', 'spec') path.join('nan', 'nan.h') path.join('build', 'Release', 'obj.target') path.join('build', 'Release', 'obj') From cfb1501720f494fc9974e3ab889f071a52e5e6c4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:38:08 -0700 Subject: [PATCH 17/53] Remove unused replication fixture --- spec/fixtures/replication/home-1/project/file-1.txt | 1 - spec/fixtures/replication/home-1/project/file-2.txt | 1 - spec/fixtures/replication/home-2/project/file-1.txt | 1 - spec/fixtures/replication/home-2/project/file-2.txt | 1 - 4 files changed, 4 deletions(-) delete mode 100644 spec/fixtures/replication/home-1/project/file-1.txt delete mode 100644 spec/fixtures/replication/home-1/project/file-2.txt delete mode 100644 spec/fixtures/replication/home-2/project/file-1.txt delete mode 100644 spec/fixtures/replication/home-2/project/file-2.txt diff --git a/spec/fixtures/replication/home-1/project/file-1.txt b/spec/fixtures/replication/home-1/project/file-1.txt deleted file mode 100644 index 980a0d5f1..000000000 --- a/spec/fixtures/replication/home-1/project/file-1.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World! diff --git a/spec/fixtures/replication/home-1/project/file-2.txt b/spec/fixtures/replication/home-1/project/file-2.txt deleted file mode 100644 index 1ce3f8113..000000000 --- a/spec/fixtures/replication/home-1/project/file-2.txt +++ /dev/null @@ -1 +0,0 @@ -Goodbye World! diff --git a/spec/fixtures/replication/home-2/project/file-1.txt b/spec/fixtures/replication/home-2/project/file-1.txt deleted file mode 100644 index 980a0d5f1..000000000 --- a/spec/fixtures/replication/home-2/project/file-1.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World! diff --git a/spec/fixtures/replication/home-2/project/file-2.txt b/spec/fixtures/replication/home-2/project/file-2.txt deleted file mode 100644 index 1ce3f8113..000000000 --- a/spec/fixtures/replication/home-2/project/file-2.txt +++ /dev/null @@ -1 +0,0 @@ -Goodbye World! From edd1f46ad2edabed17a2b538c8075f51837874f5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:43:05 -0700 Subject: [PATCH 18/53] Don't include more build files --- build/tasks/build-task.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index cda3ba9e9..5b7ece8e6 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -52,6 +52,9 @@ module.exports = (grunt) -> path.join('jasmine-node', 'node_modules', 'gaze') path.join('jasmine-node', 'spec') path.join('nan', 'nan.h') + path.join('build', 'binding.Makefile') + path.join('build', 'config.gypi') + path.join('build', 'gyp-mac-tool') path.join('build', 'Release', 'obj.target') path.join('build', 'Release', 'obj') path.join('build', 'Release', '.deps') From 8da4ed147b3cc4e55ddab8dad0da002b91cadffb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 09:47:24 -0700 Subject: [PATCH 19/53] Don't include .travis.yml and .npmignore files --- build/tasks/build-task.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 5b7ece8e6..54394105a 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -61,6 +61,8 @@ module.exports = (grunt) -> path.join('vendor', 'apm') path.join('resources', 'mac') path.join('resources', 'win') + '.travis.yml' + '.npmignore' ] ignoredPaths = ignoredPaths.map (ignoredPath) -> _.escapeRegExp(ignoredPath) From 18ea3bcb99366db8fa7429ab83f7ee27b12197c3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 10:10:51 -0700 Subject: [PATCH 20/53] Don't include atom-shell's default_app folder --- build/tasks/build-task.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 54394105a..ba834b63c 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -14,9 +14,9 @@ module.exports = (grunt) -> mkdir path.dirname(buildDir) if process.platform is 'darwin' - cp 'atom-shell/Atom.app', shellAppDir + cp 'atom-shell/Atom.app', shellAppDir, filter: -> /default_app/ else - cp 'atom-shell', shellAppDir + cp 'atom-shell', shellAppDir, filter: -> /default_app/ mkdir appDir From 97f032c66fee8984578fadb61cc98e6150216c64 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 10:11:03 -0700 Subject: [PATCH 21/53] Make e optional in test regex --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index ba834b63c..2edb578de 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -86,7 +86,7 @@ module.exports = (grunt) -> ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries') ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})" - testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}tests?#{_.escapeRegExp(path.sep)}") + testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}te?sts?#{_.escapeRegExp(path.sep)}") exampleFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}examples?#{_.escapeRegExp(path.sep)}") nodeModulesFilter = new RegExp(ignoredPaths.join('|')) From 84ff28ee6976d1e72a7f88c9838461b0344f42b7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 10:19:18 -0700 Subject: [PATCH 22/53] Remove unused package fixtures --- .../grammars/grammar.cson | 18 ----- .../snippets/.hidden-file | 1 - .../package-with-snippets/snippets/junk-file | 1 - .../package-with-snippets/snippets/test.cson | 4 - .../index.less | 3 - .../package.json | 3 - .../stylesheets/first.less | 7 -- .../stylesheets/last.less | 5 -- .../stylesheets/second.less | 9 --- .../stylesheets/ui-variables.less | 75 ------------------- 10 files changed, 126 deletions(-) delete mode 100644 spec/fixtures/packages/package-with-infinite-loop-grammar/grammars/grammar.cson delete mode 100644 spec/fixtures/packages/package-with-snippets/snippets/.hidden-file delete mode 100644 spec/fixtures/packages/package-with-snippets/snippets/junk-file delete mode 100644 spec/fixtures/packages/package-with-snippets/snippets/test.cson delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/index.less delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/package.json delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/first.less delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/last.less delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/second.less delete mode 100644 spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/ui-variables.less diff --git a/spec/fixtures/packages/package-with-infinite-loop-grammar/grammars/grammar.cson b/spec/fixtures/packages/package-with-infinite-loop-grammar/grammars/grammar.cson deleted file mode 100644 index 8ac183c23..000000000 --- a/spec/fixtures/packages/package-with-infinite-loop-grammar/grammars/grammar.cson +++ /dev/null @@ -1,18 +0,0 @@ -'fileTypes': ['package-with-infinite-loop-grammar'] -'name': 'package-with-infinite-loop-grammar' -'scopeName': 'source.package-with-infinite-loop-grammar' - -# This grammar should loop forever if the line contains an `a` -'patterns': [ - { - 'name': 'start' - 'begin': '^' - 'end': '$' - 'patterns': [ - { - name: 'negative-look-ahead' - match: "(?!a)" - } - ] - } -] diff --git a/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file b/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file deleted file mode 100644 index 7aa86d685..000000000 --- a/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file +++ /dev/null @@ -1 +0,0 @@ -This is a hidden file. Don't even try to load it as a snippet diff --git a/spec/fixtures/packages/package-with-snippets/snippets/junk-file b/spec/fixtures/packages/package-with-snippets/snippets/junk-file deleted file mode 100644 index 5549cb956..000000000 --- a/spec/fixtures/packages/package-with-snippets/snippets/junk-file +++ /dev/null @@ -1 +0,0 @@ -This file isn't CSON, but shouldn't be a big deal \ No newline at end of file diff --git a/spec/fixtures/packages/package-with-snippets/snippets/test.cson b/spec/fixtures/packages/package-with-snippets/snippets/test.cson deleted file mode 100644 index b936fea16..000000000 --- a/spec/fixtures/packages/package-with-snippets/snippets/test.cson +++ /dev/null @@ -1,4 +0,0 @@ -".test": - "Test Snippet": - prefix: "test" - body: "testing 123" diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/index.less b/spec/fixtures/packages/theme-with-multiple-imported-files/index.less deleted file mode 100644 index 3cc8a95ae..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/index.less +++ /dev/null @@ -1,3 +0,0 @@ -@import "stylesheets/first"; -@import "stylesheets/second"; -@import "stylesheets/last"; diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/package.json b/spec/fixtures/packages/theme-with-multiple-imported-files/package.json deleted file mode 100644 index 16e770b05..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "theme": "ui" -} diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/first.less b/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/first.less deleted file mode 100644 index f9af1a345..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/first.less +++ /dev/null @@ -1,7 +0,0 @@ -.editor { - padding-top: 101px; - padding-right: 101px; - padding-bottom: 101px; - - color: red; -} \ No newline at end of file diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/last.less b/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/last.less deleted file mode 100644 index c0cface8c..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/last.less +++ /dev/null @@ -1,5 +0,0 @@ -.editor { -/* padding-top: 103px; - padding-right: 103px;*/ - padding-bottom: 103px; -} \ No newline at end of file diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/second.less b/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/second.less deleted file mode 100644 index a14760b4f..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/second.less +++ /dev/null @@ -1,9 +0,0 @@ -@import "ui-variables"; - -@number: 102px; - -.editor { -/* padding-top: 102px;*/ - padding-right: @number; - padding-bottom: @number; -} diff --git a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/ui-variables.less b/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/ui-variables.less deleted file mode 100644 index 9cefd6823..000000000 --- a/spec/fixtures/packages/theme-with-multiple-imported-files/stylesheets/ui-variables.less +++ /dev/null @@ -1,75 +0,0 @@ -// Variables different from the original are marked 'Changed' - -@text-color: #333; -@text-color-subtle: #777; -@text-color-highlight: #111; -@text-color-selected: @text-color-highlight; - -@text-color-info: #5293d8; -@text-color-success: #1fe977; -@text-color-warning: #f78a46; -@text-color-error: #c00; - -@background-color-info: #0098ff; -@background-color-success: #17ca65; -@background-color-warning: #ff4800; -@background-color-error: #c00; -@background-color-highlight: rgba(255, 255, 255, 0.10); -@background-color-selected: @background-color-highlight; - -@app-background-color: #00f; // Changed - -@base-background-color: #fff; -@base-border-color: #eee; - -@pane-item-background-color: @base-background-color; -@pane-item-border-color: @base-border-color; - -@input-background-color: #f00; // Changed -@input-border-color: @base-border-color; - -@tool-panel-background-color: #f4f4f4; -@tool-panel-border-color: @base-border-color; - -@inset-panel-background-color: #eee; -@inset-panel-border-color: @base-border-color; - -@panel-heading-background-color: #ddd; -@panel-heading-border-color: transparent; - -@overlay-background-color: #f4f4f4; -@overlay-border-color: @base-border-color; - -@button-background-color: #ccc; -@button-background-color-hover: lighten(@button-background-color, 5%); -@button-background-color-selected: @button-background-color-hover; -@button-border-color: #aaa; - -@tab-bar-background-color: #fff; -@tab-bar-border-color: darken(@tab-background-color-active, 10%); -@tab-background-color: #f4f4f4; -@tab-background-color-active: #fff; -@tab-border-color: @base-border-color; - -@tree-view-background-color: @tool-panel-background-color; -@tree-view-border-color: @tool-panel-border-color; - -@ui-site-color-1: @background-color-success; // green -@ui-site-color-2: @background-color-info; // blue -@ui-site-color-3: @background-color-warning; // orange -@ui-site-color-4: #db2ff4; // purple -@ui-site-color-5: #f5e11d; // yellow - -@font-size: 12px; - -@disclosure-arrow-size: 12px; - -@component-padding: 150px; -@component-icon-padding: 5px; -@component-icon-size: 16px; -@component-line-height: 25px; -@component-border-radius: 2px; - -@tab-height: 30px; - -@font-family: Arial; From ed867666edc357d95a59a191ca30e582be5a1aa9 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 10:22:28 -0700 Subject: [PATCH 23/53] Specify regex directly as filter --- build/tasks/build-task.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 2edb578de..6ec8475b1 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -14,9 +14,9 @@ module.exports = (grunt) -> mkdir path.dirname(buildDir) if process.platform is 'darwin' - cp 'atom-shell/Atom.app', shellAppDir, filter: -> /default_app/ + cp 'atom-shell/Atom.app', shellAppDir, filter: /default_app/ else - cp 'atom-shell', shellAppDir, filter: -> /default_app/ + cp 'atom-shell', shellAppDir, filter: /default_app/ mkdir appDir From 8a8144defa9a3532fbfb7cd7d2fddeca4e98e138 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 11:06:18 -0700 Subject: [PATCH 24/53] Upgrade to dev-live-reload@0.32 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18e6942cf..1dfcccd14 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "bracket-matcher": "0.48.0", "command-palette": "0.24.0", "deprecation-cop": "0.7.0", - "dev-live-reload": "0.31.0", + "dev-live-reload": "0.32.0", "exception-reporting": "0.18.0", "feedback": "0.33.0", "find-and-replace": "0.127.0", From 8d6325b08162d8a0933dca561256c68716ad228d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 12:30:23 -0700 Subject: [PATCH 25/53] Don't include benchmark folders --- build/tasks/build-task.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 6ec8475b1..5e51fec8a 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -88,14 +88,19 @@ module.exports = (grunt) -> testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}te?sts?#{_.escapeRegExp(path.sep)}") exampleFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}examples?#{_.escapeRegExp(path.sep)}") + benchmarkFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}benchmarks?#{_.escapeRegExp(path.sep)}") nodeModulesFilter = new RegExp(ignoredPaths.join('|')) filterNodeModule = (pathToCopy) -> + return true if benchmarkFolderPattern.test(pathToCopy) + pathToCopy = path.resolve(pathToCopy) nodeModulesFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy) packageFilter = new RegExp("(#{ignoredPaths.join('|')})|(.+\\.(cson|coffee)$)") filterPackage = (pathToCopy) -> + return true if benchmarkFolderPattern.test(pathToCopy) + pathToCopy = path.resolve(pathToCopy) packageFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy) From 2e1239345e5667c37ec891724b9051b9b5b754ce Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Jul 2014 12:35:34 -0700 Subject: [PATCH 26/53] Don't include bootstrap site files --- build/tasks/build-task.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 5e51fec8a..904fa6c80 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -46,7 +46,9 @@ module.exports = (grunt) -> path.join('oniguruma', 'deps') path.join('less', 'dist') path.join('bootstrap', 'docs') - path.join('bootstrap', 'examples') + path.join('bootstrap', '_config.yml') + path.join('bootstrap', '_includes') + path.join('bootstrap', '_layouts') path.join('pegjs', 'examples') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') From 09711d5a88a42cb041f9565ec8b789ef1eb6c5ff Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 06:46:22 -0700 Subject: [PATCH 27/53] Don't include target.mk or linker.lock files --- build/tasks/build-task.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 904fa6c80..5bba0a006 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -83,6 +83,10 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.(cc|h)*" ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.(cc|h)*" + # Ignore build files + ignoredPaths.push "#{_.escapeRegExp(path.sep)}.*\\.target.mk$" + ignoredPaths.push "#{_.escapeRegExp(path.sep)}linker\\.lock$" + # Hunspell dictionaries are only not needed on OS X. if process.platform is 'darwin' ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries') From 307d4984a2555f86dd85ac0852c945bdac520a5b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 14:04:17 -0700 Subject: [PATCH 28/53] Don't include binding.gyp files --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 5bba0a006..d55ded726 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -84,6 +84,7 @@ module.exports = (grunt) -> ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.(cc|h)*" # Ignore build files + ignoredPaths.push "#{_.escapeRegExp(path.sep)}binding\\.gyp$" ignoredPaths.push "#{_.escapeRegExp(path.sep)}.*\\.target.mk$" ignoredPaths.push "#{_.escapeRegExp(path.sep)}linker\\.lock$" From d76168421263ca8102f7f457edfbf2b270e509dc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 14:05:50 -0700 Subject: [PATCH 29/53] Don't include nan --- build/tasks/build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index d55ded726..59fa7da54 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -53,7 +53,7 @@ module.exports = (grunt) -> path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') path.join('jasmine-node', 'spec') - path.join('nan', 'nan.h') + path.join('node_modules', 'nan') path.join('build', 'binding.Makefile') path.join('build', 'config.gypi') path.join('build', 'gyp-mac-tool') From adaee8493339f4076d51ada434ef858e54681d90 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 15:16:06 -0700 Subject: [PATCH 30/53] Remove unused fixtures --- spec/fixtures/binary-file.png | Bin 392 -> 0 bytes spec/fixtures/js | 1 - spec/fixtures/sample-with-error.less | 1 - spec/fixtures/sample.plist | 71 --------------------------- spec/fixtures/symlink-to-dir | 1 - spec/fixtures/symlink-to-file | 1 - spec/fixtures/zed/a | 1 - 7 files changed, 76 deletions(-) delete mode 100644 spec/fixtures/binary-file.png delete mode 100644 spec/fixtures/js delete mode 100644 spec/fixtures/sample-with-error.less delete mode 100644 spec/fixtures/sample.plist delete mode 120000 spec/fixtures/symlink-to-dir delete mode 120000 spec/fixtures/symlink-to-file delete mode 100644 spec/fixtures/zed/a diff --git a/spec/fixtures/binary-file.png b/spec/fixtures/binary-file.png deleted file mode 100644 index b4d6eb7c34f41227ad8ef43d39b253531984c235..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmV;30eAk1P)KQ@+z^OELr_5=fe;#EX6pM5 z-|q%LvE6R}p3f&y6j2lfuh)wp2pEsYc%Fx%C;&)RRY}v7Fbug~ue{%HY}@91KBH+G zuItilHj!mn;`=_w;}OsESglq#jzd*dtk-MW?KZluBm4b6x7&@!<3U~5Y&IKQ*JU!9 z&}cLWf`Ivajv}R`u4@d#pw((oRTW_vBBkVVxiA`y7!HSs<#PGw`#zRsp{gp2#RAhb z+3)wvW;2o`!LlrV(lq^z-GL`r9?`}kFM*#bzPI^Ia!vGWf|A&6(IzU<6zr1ilU%Qr&HoM=KKAk>pDUR m(lq68IAEG4pU;Op&-n*nypjuoH@BGp0000 - - - - fileTypes - - txt - - keyEquivalent - ^~P - name - Plain Text - patterns - - - captures - - 1 - - name - punctuation.definition.item.text - - - match - ^\s*(•).*$\n? - name - meta.bullet-point.strong.text - - - captures - - 1 - - name - punctuation.definition.item.text - - - match - ^\s*(·).*$\n? - name - meta.bullet-point.light.text - - - captures - - 1 - - name - punctuation.definition.item.text - - - match - ^\s*(\*).*$\n? - name - meta.bullet-point.star.text - - - begin - ^([ \t]*)(?=\S) - contentName - meta.paragraph.text - end - ^(?!\1(?=\S)) - - - scopeName - text.plain - uuid - 3130E4FA-B10E-11D9-9F75-000D93589AF6 - - diff --git a/spec/fixtures/symlink-to-dir b/spec/fixtures/symlink-to-dir deleted file mode 120000 index 872451932..000000000 --- a/spec/fixtures/symlink-to-dir +++ /dev/null @@ -1 +0,0 @@ -dir \ No newline at end of file diff --git a/spec/fixtures/symlink-to-file b/spec/fixtures/symlink-to-file deleted file mode 120000 index cdd38b0e4..000000000 --- a/spec/fixtures/symlink-to-file +++ /dev/null @@ -1 +0,0 @@ -sample.js \ No newline at end of file diff --git a/spec/fixtures/zed/a b/spec/fixtures/zed/a deleted file mode 100644 index 789819226..000000000 --- a/spec/fixtures/zed/a +++ /dev/null @@ -1 +0,0 @@ -a From 72727c2a81e2867549f00b53453f9b4edb8838d6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 15:37:48 -0700 Subject: [PATCH 31/53] Don't include generated Makefiles --- build/tasks/build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 59fa7da54..5fd8738a3 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -57,6 +57,7 @@ module.exports = (grunt) -> path.join('build', 'binding.Makefile') path.join('build', 'config.gypi') path.join('build', 'gyp-mac-tool') + path.join('build', 'Makefile') path.join('build', 'Release', 'obj.target') path.join('build', 'Release', 'obj') path.join('build', 'Release', '.deps') From 75410e07daf7d21f1072a631323215af5f5b1bef Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 15:43:58 -0700 Subject: [PATCH 32/53] Don't include .node.dSYM folders --- build/tasks/build-task.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 5fd8738a3..e210d7db7 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -86,8 +86,9 @@ module.exports = (grunt) -> # Ignore build files ignoredPaths.push "#{_.escapeRegExp(path.sep)}binding\\.gyp$" - ignoredPaths.push "#{_.escapeRegExp(path.sep)}.*\\.target.mk$" + ignoredPaths.push "#{_.escapeRegExp(path.sep)}.+\\.target.mk$" ignoredPaths.push "#{_.escapeRegExp(path.sep)}linker\\.lock$" + ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.+\\.node\\.dSYM" # Hunspell dictionaries are only not needed on OS X. if process.platform is 'darwin' From caa15e42ac9115786b827012095df9afe424b54d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 16 Jul 2014 15:56:54 -0700 Subject: [PATCH 33/53] Don't include npm docs --- build/tasks/build-task.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index e210d7db7..89bdb3e35 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -49,6 +49,9 @@ module.exports = (grunt) -> path.join('bootstrap', '_config.yml') path.join('bootstrap', '_includes') path.join('bootstrap', '_layouts') + path.join('npm', 'doc') + path.join('npm', 'html') + path.join('npm', 'man') path.join('pegjs', 'examples') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') From 662b8b30a170cfde023ed76fb69057eb696d3751 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 21 Jul 2014 18:03:41 -0700 Subject: [PATCH 34/53] Don't include pegjs when grammars are precompiled --- build/tasks/build-task.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 89bdb3e35..bd08fa9f6 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -67,6 +67,13 @@ module.exports = (grunt) -> path.join('vendor', 'apm') path.join('resources', 'mac') path.join('resources', 'win') + + # These are only require in dev mode when the grammar isn't precompiled + path.join('atom-keymap', 'node_modules', 'loophole') + path.join('atom-keymap', 'node_modules', 'pegjs') + path.join('snippets', 'node_modules', 'loophole') + path.join('snippets', 'node_modules', 'pegjs') + '.travis.yml' '.npmignore' ] From 9c78b9832b89ffd6ee713df6b28c0af3eddd1140 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 21 Jul 2014 18:15:29 -0700 Subject: [PATCH 35/53] Dedupe node-gyp in apm --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index f286096a6..2af11cdfa 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -77,7 +77,7 @@ function bootstrap() { moduleInstallCommand, dedupeApmCommand + ' ' + packagesToDedupe.join(' '), { - command: dedupeNpmCommand + ' request', + command: dedupeNpmCommand + ' request node-gyp', options: { cwd: path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager') } From 3326cf357fa2dd2dc1d110e2ca9e7cd02cdaa1ba Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 21 Jul 2014 18:18:10 -0700 Subject: [PATCH 36/53] Dedupe semver in apm --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 2af11cdfa..a7c876bb4 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -77,7 +77,7 @@ function bootstrap() { moduleInstallCommand, dedupeApmCommand + ' ' + packagesToDedupe.join(' '), { - command: dedupeNpmCommand + ' request node-gyp', + command: dedupeNpmCommand + ' request node-gyp semver', options: { cwd: path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager') } From e13defc0f78fa573acd6b8305ffa46a584bb78cd Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 08:24:03 -0700 Subject: [PATCH 37/53] Don't include broken symlinks --- build/tasks/build-task.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index bd08fa9f6..4e1647280 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -52,6 +52,9 @@ module.exports = (grunt) -> path.join('npm', 'doc') path.join('npm', 'html') path.join('npm', 'man') + path.join('npm', 'node_modules', '.bin', 'beep') + path.join('npm', 'node_modules', '.bin', 'clear') + path.join('npm', 'node_modules', '.bin', 'starwars') path.join('pegjs', 'examples') path.join('jasmine-reporters', 'ext') path.join('jasmine-node', 'node_modules', 'gaze') @@ -71,8 +74,10 @@ module.exports = (grunt) -> # These are only require in dev mode when the grammar isn't precompiled path.join('atom-keymap', 'node_modules', 'loophole') path.join('atom-keymap', 'node_modules', 'pegjs') + path.join('atom-keymap', 'node_modules', '.bin', 'pegjs') path.join('snippets', 'node_modules', 'loophole') path.join('snippets', 'node_modules', 'pegjs') + path.join('snippets', 'node_modules', '.bin', 'pegjs') '.travis.yml' '.npmignore' From 6a0e7cfb2439501cae5de68822e88b55f0e5c888 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 08:24:16 -0700 Subject: [PATCH 38/53] Add task to output file types in build folder --- build/tasks/output-build-filetypes.coffee | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 build/tasks/output-build-filetypes.coffee diff --git a/build/tasks/output-build-filetypes.coffee b/build/tasks/output-build-filetypes.coffee new file mode 100644 index 000000000..ddd015c1c --- /dev/null +++ b/build/tasks/output-build-filetypes.coffee @@ -0,0 +1,17 @@ +path = require 'path' + +module.exports = (grunt) -> + grunt.registerTask 'output-build-filetypes', 'Log counts for each filetype in the built application', -> + shellAppDir = grunt.config.get('atom.shellAppDir') + + types = {} + grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) -> + extension = path.extname(fileName) or fileName + types[extension] ?= 0 + types[extension]++ + + extensions = Object.keys(types).sort (extension1, extension2) -> + types[extension2] - types[extension1] + + extensions.forEach (extension) -> + grunt.log.error "#{extension}: #{types[extension]}" From 0e201d539a9e8f88cdb43da39f5be28586202df7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 08:31:03 -0700 Subject: [PATCH 39/53] Sort by name when type count is the same --- build/tasks/output-build-filetypes.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/tasks/output-build-filetypes.coffee b/build/tasks/output-build-filetypes.coffee index ddd015c1c..64b952bbe 100644 --- a/build/tasks/output-build-filetypes.coffee +++ b/build/tasks/output-build-filetypes.coffee @@ -11,7 +11,11 @@ module.exports = (grunt) -> types[extension]++ extensions = Object.keys(types).sort (extension1, extension2) -> - types[extension2] - types[extension1] + diff = types[extension2] - types[extension1] + if diff is 0 + extension1.toLowerCase().localeCompare(extension2.toLowerCase()) + else + diff extensions.forEach (extension) -> grunt.log.error "#{extension}: #{types[extension]}" From e9890810d35d035231fa9196bc46791eef581940 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 08:32:47 -0700 Subject: [PATCH 40/53] Don't include more dot files --- build/tasks/build-task.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 4e1647280..c9964b474 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -79,8 +79,11 @@ module.exports = (grunt) -> path.join('snippets', 'node_modules', 'pegjs') path.join('snippets', 'node_modules', '.bin', 'pegjs') - '.travis.yml' + '.DS_Store' + '.jshintrc' '.npmignore' + '.pairs' + '.travis.yml' ] ignoredPaths = ignoredPaths.map (ignoredPath) -> _.escapeRegExp(ignoredPath) From 29970acaa9355975ecabe2c6d72d740c9f43e93f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 10:28:07 -0700 Subject: [PATCH 41/53] :memo: Document second argument of callback --- src/editor.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/editor.coffee b/src/editor.coffee index 870c14b6c..4531d4dce 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1067,9 +1067,11 @@ class Editor extends Model # All the changes made inside the given {Function} can be reverted with a # single call to {::undo}. # - # fn - A {Function} that will be called with each {Selection}. + # fn - A {Function} that will be called once for each {Selection}. The first + # argument will be a {Selection} and the second argument will be the + # {Number} index of that selection. mutateSelectedText: (fn) -> - @transact => fn(selection,index) for selection,index in @getSelections() + @transact => fn(selection, index) for selection, index in @getSelections() replaceSelectedText: (options={}, fn) -> {selectWordIfEmpty} = options From 9f9ca0a2cf5a5349796dce608e45ce4211a15ac8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 10:45:19 -0700 Subject: [PATCH 42/53] Don't dedupe node-gyp npm has hard-coded paths to it so it can't be moved up. --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index a7c876bb4..c802a45cd 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -77,7 +77,7 @@ function bootstrap() { moduleInstallCommand, dedupeApmCommand + ' ' + packagesToDedupe.join(' '), { - command: dedupeNpmCommand + ' request node-gyp semver', + command: dedupeNpmCommand + ' request semver', options: { cwd: path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager') } From 5355310cc76a57dc79b14d026b948db1a4c7d0ea Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 10:59:26 -0700 Subject: [PATCH 43/53] Upgrade to apm 0.83 --- apm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm/package.json b/apm/package.json index fc0e57c07..40c9d3625 100644 --- a/apm/package.json +++ b/apm/package.json @@ -6,6 +6,6 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "atom-package-manager": "0.82.0" + "atom-package-manager": "0.83.0" } } From 22eb16352c9e134492217c37242908047c9d00a5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 11:30:00 -0700 Subject: [PATCH 44/53] Add more config file items to File menu --- menus/win32.cson | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/menus/win32.cson b/menus/win32.cson index 6f43528bf..314a941e3 100644 --- a/menus/win32.cson +++ b/menus/win32.cson @@ -9,6 +9,11 @@ { label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' } { type: 'separator' } { label: 'Se&ttings', command: 'application:show-settings' } + { label: 'Open Your Config', command: 'application:open-your-config' } + { label: 'Open Your Init Script', command: 'application:open-your-init-script' } + { label: 'Open Your Keymap', command: 'application:open-your-keymap' } + { label: 'Open Your Snippets', command: 'application:open-your-snippets' } + { label: 'Open Your Stylesheet', command: 'application:open-your-stylesheet' } { type: 'separator' } { label: '&Save', command: 'core:save' } { label: 'Save &As...', command: 'core:save-as' } From 9a95c3acef0a3babad2a2c9041df64c516aae51d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 12:31:28 -0700 Subject: [PATCH 45/53] Upgrade to language-go@0.15 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1dfcccd14..0d40e21a3 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "language-css": "0.17.0", "language-gfm": "0.43.0", "language-git": "0.9.0", - "language-go": "0.14.0", + "language-go": "0.15.0", "language-html": "0.22.0", "language-hyperlink": "0.10.0", "language-java": "0.11.0", From 82f0a6841968350223e5a04a6264fc543e5dae81 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 13:03:14 -0700 Subject: [PATCH 46/53] Upgrade to snippets@0.49 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d40e21a3..2a51735c8 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "package-generator": "0.31.0", "release-notes": "0.35.0", "settings-view": "0.134.0", - "snippets": "0.48.0", + "snippets": "0.49.0", "spell-check": "0.38.0", "status-bar": "0.41.0", "styleguide": "0.29.0", From 0acd3ebd4b501129ee9005ae8c43e006faf6585d Mon Sep 17 00:00:00 2001 From: probablycorey Date: Wed, 23 Jul 2014 13:55:29 -0700 Subject: [PATCH 47/53] Use `Tab` instead of `Buffer` in menu items. Closes #1645 --- menus/darwin.cson | 2 +- menus/linux.cson | 4 ++-- menus/win32.cson | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/menus/darwin.cson b/menus/darwin.cson index 647f20d6a..ae32b353e 100644 --- a/menus/darwin.cson +++ b/menus/darwin.cson @@ -37,7 +37,7 @@ { label: 'Save As...', command: 'core:save-as' } { label: 'Save All', command: 'window:save-all' } { type: 'separator' } - { label: 'Close Buffer', command: 'core:close' } + { label: 'Close Tab', command: 'core:close' } { label: 'Close Pane', command: 'pane:close' } { label: 'Close Window', command: 'window:close' } ] diff --git a/menus/linux.cson b/menus/linux.cson index 850b25d91..f12c46406 100644 --- a/menus/linux.cson +++ b/menus/linux.cson @@ -14,8 +14,8 @@ { label: 'Save &As...', command: 'core:save-as' } { label: 'Save A&ll', command: 'window:save-all' } { type: 'separator' } - { label: '&Close Buffer', command: 'core:close' } - { label: 'Close All &Buffers', command: 'pane:close' } + { label: '&Close Tab', command: 'core:close' } + { label: 'Close &Pane', command: 'pane:close' } { label: 'Clos&e Window', command: 'window:close' } { type: 'separator' } { label: 'Quit', command: 'application:quit' } diff --git a/menus/win32.cson b/menus/win32.cson index 314a941e3..4654d8841 100644 --- a/menus/win32.cson +++ b/menus/win32.cson @@ -19,8 +19,8 @@ { label: 'Save &As...', command: 'core:save-as' } { label: 'Save A&ll', command: 'window:save-all' } { type: 'separator' } - { label: '&Close Buffer', command: 'core:close' } - { label: 'Close All &Buffers', command: 'pane:close' } + { label: '&Close Tab', command: 'core:close' } + { label: 'Close &Pane', command: 'pane:close' } { label: 'Clos&e Window', command: 'window:close' } { type: 'separator' } { label: 'E&xit', command: 'application:quit' } From e3e0df7728033039577fc3163d0c4cb2f7a6efa5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 15:34:50 -0700 Subject: [PATCH 48/53] Upgrade to language-javascript@0.37 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a51735c8..814ffcbcf 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "language-html": "0.22.0", "language-hyperlink": "0.10.0", "language-java": "0.11.0", - "language-javascript": "0.36.0", + "language-javascript": "0.37.0", "language-json": "0.8.0", "language-less": "0.13.0", "language-make": "0.10.0", From a896d71948f3bf8f76b15aca76f58f335e5e7829 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 15:37:24 -0700 Subject: [PATCH 49/53] Upgrade to language-c@0.24 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 814ffcbcf..8f89af9c3 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "whitespace": "0.25.0", "wrap-guide": "0.21.0", - "language-c": "0.23.0", + "language-c": "0.24.0", "language-coffee-script": "0.27.0", "language-css": "0.17.0", "language-gfm": "0.43.0", From 2a9c78ef9229f19a1d692cdbb4effdde2f4803aa Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 23 Jul 2014 16:20:48 -0700 Subject: [PATCH 50/53] Move horiz scrollbar into the scrollView Also remove all the gutter width calculation. It was flawed anyway, --- src/editor-component.coffee | 51 ++++++++++------------------------ src/gutter-component.coffee | 9 ------ src/scrollbar-component.coffee | 8 +++--- 3 files changed, 18 insertions(+), 50 deletions(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 2ec55da8c..29029756e 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -24,7 +24,6 @@ EditorComponent = React.createClass visible: false autoHeight: false - gutterWidth: 0 pendingScrollTop: null pendingScrollLeft: null selectOnMouseMove: false @@ -94,8 +93,8 @@ EditorComponent = React.createClass div {className, style, tabIndex: -1}, if not mini and showLineNumbers GutterComponent { - ref: 'gutter', onMouseDown: @onGutterMouseDown, onWidthChanged: @onGutterWidthChanged, - lineDecorations, defaultCharWidth, editor, renderedRowRange, maxLineNumberDigits, scrollViewHeight, + ref: 'gutter', onMouseDown: @onGutterMouseDown, lineDecorations, + defaultCharWidth, editor, renderedRowRange, maxLineNumberDigits, scrollViewHeight, scrollTop, scrollHeight, lineHeightInPixels, @pendingChanges, mouseWheelScreenRow, @useHardwareAcceleration } @@ -121,6 +120,18 @@ EditorComponent = React.createClass placeholderText, @performedInitialMeasurement } + ScrollbarComponent + ref: 'horizontalScrollbar' + className: 'horizontal-scrollbar' + orientation: 'horizontal' + onScroll: @onHorizontalScroll + scrollLeft: scrollLeft + scrollWidth: scrollWidth + visible: horizontallyScrollable and not @refreshingScrollbars and not @measuringScrollbars + scrollableInOppositeDirection: verticallyScrollable + verticalScrollbarWidth: verticalScrollbarWidth + horizontalScrollbarHeight: horizontalScrollbarHeight + ScrollbarComponent ref: 'verticalScrollbar' className: 'vertical-scrollbar' @@ -133,19 +144,6 @@ EditorComponent = React.createClass verticalScrollbarWidth: verticalScrollbarWidth horizontalScrollbarHeight: horizontalScrollbarHeight - ScrollbarComponent - ref: 'horizontalScrollbar' - className: 'horizontal-scrollbar' - orientation: 'horizontal' - onScroll: @onHorizontalScroll - gutterWidth: @gutterWidth - scrollLeft: scrollLeft - scrollWidth: scrollWidth - visible: horizontallyScrollable and not @refreshingScrollbars and not @measuringScrollbars - scrollableInOppositeDirection: verticallyScrollable - verticalScrollbarWidth: verticalScrollbarWidth - horizontalScrollbarHeight: horizontalScrollbarHeight - # Also used to measure the height/width of scrollbars after the initial render ScrollbarCornerComponent ref: 'scrollbarCorner' @@ -213,8 +211,6 @@ EditorComponent = React.createClass @measureLineHeightAndDefaultCharWidthIfNeeded(prevState) @remeasureCharacterWidthsIfNeeded(prevState) - @measureGutterIfNeeded() - performInitialMeasurement: -> @updatesPaused = true @measureLineHeightAndDefaultCharWidth() @@ -671,7 +667,6 @@ EditorComponent = React.createClass editor.setSelectedScreenRange([tailPosition, [dragRow + 1, 0]]) onStylesheetsChanged: (stylesheet) -> - @measureGutter() @refreshScrollbars() if @containsScrollbarSelector(stylesheet) @remeasureCharacterWidthsIfVisibleAfterNextUpdate = true @requestUpdate() if @visible @@ -838,23 +833,6 @@ EditorComponent = React.createClass remeasureCharacterWidths: -> @refs.lines.remeasureCharacterWidths() - onGutterWidthChanged: (gutterWidth) -> - if gutterWidth isnt @gutterWidth - @gutterWidth = gutterWidth - @requestUpdate() - - measureGutterIfNeeded: -> - if @visible and @measureGutterWhenEditorIsVisible - @measureGutterWhenEditorIsVisible = false - @measureGutter() - - measureGutter: -> - if @state.showLineNumbers - @refs.gutter.measureWidth() - else - @gutterWidth = 0 - @requestUpdate() - measureScrollbars: -> return unless @visible @measuringScrollbars = false @@ -951,7 +929,6 @@ EditorComponent = React.createClass @setState({showInvisibles}) setShowLineNumbers: (showLineNumbers) -> - @measureGutterWhenEditorIsVisible = true @setState({showLineNumbers}) setScrollSensitivity: (scrollSensitivity) -> diff --git a/src/gutter-component.coffee b/src/gutter-component.coffee index 19fd6b4d4..01106fa4c 100644 --- a/src/gutter-component.coffee +++ b/src/gutter-component.coffee @@ -66,9 +66,6 @@ GutterComponent = React.createClass @clearScreenRowCaches() unless oldProps.lineHeightInPixels is @props.lineHeightInPixels @updateLineNumbers() - unless isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'defaultCharWidth') - @measureWidth() - clearScreenRowCaches: -> @lineNumberIdsByScreenRow = {} @screenRowsByLineNumberId = {} @@ -223,9 +220,3 @@ GutterComponent = React.createClass editor.unfoldBufferRow(bufferRow) else editor.foldBufferRow(bufferRow) - - measureWidth: -> - width = @getDOMNode().offsetWidth - unless width is @measuredWidth - @measuredWidth = width - @props.onWidthChanged?(width) diff --git a/src/scrollbar-component.coffee b/src/scrollbar-component.coffee index ba284e0a0..b8657b594 100644 --- a/src/scrollbar-component.coffee +++ b/src/scrollbar-component.coffee @@ -7,7 +7,7 @@ ScrollbarComponent = React.createClass displayName: 'ScrollbarComponent' render: -> - {orientation, className, scrollHeight, scrollWidth, gutterWidth, visible} = @props + {orientation, className, scrollHeight, scrollWidth, visible} = @props {scrollableInOppositeDirection, horizontalScrollbarHeight, verticalScrollbarWidth} = @props style = {} @@ -17,9 +17,9 @@ ScrollbarComponent = React.createClass style.width = verticalScrollbarWidth style.bottom = horizontalScrollbarHeight if scrollableInOppositeDirection when 'horizontal' - style.height = horizontalScrollbarHeight + style.left = 0 style.right = verticalScrollbarWidth if scrollableInOppositeDirection - style.left = gutterWidth + style.height = horizontalScrollbarHeight div {className, style, @onScroll}, switch orientation @@ -41,7 +41,7 @@ ScrollbarComponent = React.createClass when 'vertical' not isEqualForProperties(newProps, @props, 'scrollHeight', 'scrollTop', 'scrollableInOppositeDirection') when 'horizontal' - not isEqualForProperties(newProps, @props, 'scrollWidth', 'scrollLeft', 'gutterWidth', 'scrollableInOppositeDirection') + not isEqualForProperties(newProps, @props, 'scrollWidth', 'scrollLeft', 'scrollableInOppositeDirection') componentDidUpdate: -> {orientation, scrollTop, scrollLeft} = @props From 3295b9b0dd52ec7aba521f8db4eb986ae23b4502 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 23 Jul 2014 16:25:10 -0700 Subject: [PATCH 51/53] Romove runSetImmediateCallbacks() in many cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is because of the removal of the gutter measurement. When there was measurement, every load of the editor would measure and request at least one render based on the reset of the gutter width. These specs don’t need to call runSetImmediateCallbacks() as they either don’t do anything to cause a render or they render immediately (in the case of updated options). In some cases, we need to make sure nothing happened, so I added a hasSetImmediateCallbacks() function, which is used in specs where nothing should have happened. --- spec/editor-component-spec.coffee | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 883049753..d8efa8150 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -7,7 +7,7 @@ nbsp = String.fromCharCode(160) describe "EditorComponent", -> [contentNode, editor, wrapperView, wrapperNode, component, componentNode, verticalScrollbarNode, horizontalScrollbarNode] = [] - [lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame, runSetImmediateCallbacks, lineOverdrawMargin] = [] + [lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame, runSetImmediateCallbacks, hasSetImmediateCallbacks, lineOverdrawMargin] = [] beforeEach -> lineOverdrawMargin = 2 @@ -41,6 +41,9 @@ describe "EditorComponent", -> setImmediateFns.length = 0 fn() for fn in fns + hasSetImmediateCallbacks = -> + setImmediateFns.length isnt 0 + spyOn(window, 'setImmediate').andCallFake (fn) -> setImmediateFns.push(fn) contentNode = document.querySelector('#jasmine-content') @@ -269,7 +272,6 @@ describe "EditorComponent", -> describe "when indent guides are enabled", -> beforeEach -> component.setShowIndentGuide(true) - runSetImmediateCallbacks() it "adds an 'indent-guide' class to spans comprising the leading whitespace", -> line1LeafNodes = getLeafNodes(component.lineNodeForScreenRow(1)) @@ -346,7 +348,6 @@ describe "EditorComponent", -> describe "when indent guides are disabled", -> beforeEach -> component.setShowIndentGuide(false) - runSetImmediateCallbacks() it "does not render indent guides on lines containing only whitespace", -> editor.getBuffer().insert([1, Infinity], '\n ') @@ -563,7 +564,7 @@ describe "EditorComponent", -> it "does not fold when the line number componentNode is clicked", -> lineNumber = component.lineNumberNodeForScreenRow(1) lineNumber.dispatchEvent(buildClickEvent(lineNumber)) - runSetImmediateCallbacks() + expect(hasSetImmediateCallbacks()).toBe false expect(lineNumberHasClass(1, 'folded')).toBe false describe "cursor rendering", -> @@ -1404,7 +1405,6 @@ describe "EditorComponent", -> beforeEach -> cursor = editor.getCursor() cursor.setScreenPosition([0, 0]) - runSetImmediateCallbacks() it "adds the 'has-selection' class to the editor when there is a selection", -> expect(componentNode.classList.contains('has-selection')).toBe false @@ -1566,7 +1566,6 @@ describe "EditorComponent", -> runSetImmediateCallbacks() expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' it "updates the position and width of the horizontal scrollbar when editor.showLineNumbers is toggled", -> componentNode.style.width = 10 * charWidth + 'px' @@ -1703,7 +1702,7 @@ describe "EditorComponent", -> wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 10) Object.defineProperty(wheelEvent, 'target', get: -> lineNode) componentNode.dispatchEvent(wheelEvent) - runSetImmediateCallbacks() + expect(hasSetImmediateCallbacks()).toBe false expect(editor.getScrollTop()).toBe 0 @@ -1720,7 +1719,7 @@ describe "EditorComponent", -> wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 100) # goes nowhere, we're already at scrollTop 0 Object.defineProperty(wheelEvent, 'target', get: -> lineNode) componentNode.dispatchEvent(wheelEvent) - runSetImmediateCallbacks() + expect(hasSetImmediateCallbacks()).toBe false expect(component.mouseWheelScreenRow).toBe 0 editor.insertText("hello") @@ -1818,7 +1817,7 @@ describe "EditorComponent", -> it "does not handle input events when input is disabled", -> component.setInputEnabled(false) componentNode.dispatchEvent(buildTextInputEvent(data: 'x', target: inputNode)) - runSetImmediateCallbacks() + expect(hasSetImmediateCallbacks()).toBe false expect(editor.lineForBufferRow(0)).toBe 'var quicksort = function () {' describe "when IME composition is used to insert international characters", -> @@ -1936,7 +1935,6 @@ describe "EditorComponent", -> hiddenParent.style.display = 'block' advanceClock(component.domPollingInterval) - runSetImmediateCallbacks() expect(componentNode.querySelectorAll('.line').length).toBeGreaterThan 0 @@ -1946,7 +1944,6 @@ describe "EditorComponent", -> initialLineHeightInPixels = editor.getLineHeightInPixels() component.setLineHeight(2) - runSetImmediateCallbacks() expect(editor.getLineHeightInPixels()).toBe initialLineHeightInPixels wrapperView.show() @@ -1959,7 +1956,6 @@ describe "EditorComponent", -> initialCharWidth = editor.getDefaultCharWidth() component.setFontSize(22) - runSetImmediateCallbacks() expect(editor.getLineHeightInPixels()).toBe initialLineHeightInPixels expect(editor.getDefaultCharWidth()).toBe initialCharWidth @@ -1971,7 +1967,6 @@ describe "EditorComponent", -> wrapperView.hide() component.setFontSize(22) - runSetImmediateCallbacks() wrapperView.show() editor.setCursorBufferPosition([0, Infinity]) @@ -1988,7 +1983,6 @@ describe "EditorComponent", -> initialCharWidth = editor.getDefaultCharWidth() component.setFontFamily('sans-serif') - runSetImmediateCallbacks() expect(editor.getDefaultCharWidth()).toBe initialCharWidth wrapperView.show() @@ -1998,7 +1992,6 @@ describe "EditorComponent", -> wrapperView.hide() component.setFontFamily('sans-serif') - runSetImmediateCallbacks() wrapperView.show() editor.setCursorBufferPosition([0, Infinity]) From 242df788e652f7ba61014a4e279efb2ec4b9385c Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 23 Jul 2014 16:25:24 -0700 Subject: [PATCH 52/53] Remove unnecessary scrollbar specs --- spec/editor-component-spec.coffee | 50 ------------------------------- 1 file changed, 50 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index d8efa8150..58d061505 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1566,58 +1566,8 @@ describe "EditorComponent", -> runSetImmediateCallbacks() expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - - it "updates the position and width of the horizontal scrollbar when editor.showLineNumbers is toggled", -> - componentNode.style.width = 10 * charWidth + 'px' - component.measureHeightAndWidth() - runSetImmediateCallbacks() - - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - - atom.config.set("editor.showLineNumbers", false) - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() expect(horizontalScrollbarNode.style.left).toBe '0px' - atom.config.set("editor.showLineNumbers", true) - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.scrollWidth).toBe editor.getScrollWidth() - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - - describe "when the editor is hidden", -> - hideEditorView = -> - wrapperNode.style.display = 'none' - expect(component.isVisible()).toBe false - - showEditorView = -> - wrapperNode.style.display = 'block' - expect(component.isVisible()).toBe true - - it "updates the position of the horizontal scrollbar only when the editor is visible", -> - # toggling gutter off - hideEditorView() - atom.config.set("editor.showLineNumbers", false) - - showEditorView() - component.forceUpdate() - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.style.left).toBe '0px' - - # toggling gutter back on - hideEditorView() - atom.config.set("editor.showLineNumbers", true) - - showEditorView() - component.forceUpdate() - runSetImmediateCallbacks() - gutterNode = componentNode.querySelector('.gutter') - expect(horizontalScrollbarNode.style.left).toBe gutterNode.offsetWidth + 'px' - describe "mousewheel events", -> beforeEach -> atom.config.set('editor.scrollSensitivity', 100) From 5d00ca8bb6d7c71d1d8c433ada801e386989c49e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Jul 2014 20:02:54 -0700 Subject: [PATCH 53/53] Check platform not env --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 62672b1e4..f61ae7261 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -41,7 +41,7 @@ module.exports = (grunt) -> buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') installDir = grunt.option('install-dir') - home = if process.env is 'win32' then process.env.USERPROFILE else process.env.HOME + home = if process.platform is 'win32' then process.env.USERPROFILE else process.env.HOME atomShellDownloadDir = path.join(home, '.atom', 'atom-shell') symbolsDir = path.join(buildDir, 'Atom.breakpad.syms')