diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 2aa4a8c67..62672b1e4 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -40,7 +40,10 @@ module.exports = (grunt) -> appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom' buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') installDir = grunt.option('install-dir') - atomShellDownloadDir = path.join(os.tmpdir(), 'atom-cached-atom-shells') + + home = if process.env is 'win32' then process.env.USERPROFILE else process.env.HOME + atomShellDownloadDir = path.join(home, '.atom', 'atom-shell') + symbolsDir = path.join(buildDir, 'Atom.breakpad.syms') shellAppDir = path.join(buildDir, appName) if process.platform is 'win32' diff --git a/build/tasks/prebuild-less-task.coffee b/build/tasks/prebuild-less-task.coffee index c8cf33083..ecd0fb2c8 100644 --- a/build/tasks/prebuild-less-task.coffee +++ b/build/tasks/prebuild-less-task.coffee @@ -9,10 +9,12 @@ module.exports = (grunt) -> ['atom-dark-ui', 'atom-light-syntax'] ['atom-dark-ui', 'solarized-dark-syntax'] ['atom-dark-ui', 'base16-tomorrow-dark-theme'] + ['atom-dark-ui', 'base16-tomorrow-light-theme'] ['atom-light-ui', 'atom-light-syntax'] ['atom-light-ui', 'atom-dark-syntax'] ['atom-light-ui', 'solarized-dark-syntax'] ['atom-light-ui', 'base16-tomorrow-dark-theme'] + ['atom-light-ui', 'base16-tomorrow-light-theme'] ] directory = path.join(grunt.config.get('atom.appDir'), 'less-compile-cache') diff --git a/docs/apm-rest-api.md b/docs/apm-rest-api.md index 5e3a517fc..ce352161e 100644 --- a/docs/apm-rest-api.md +++ b/docs/apm-rest-api.md @@ -27,6 +27,10 @@ All requests that take parameters require `application/json`. #### GET /api/packages +Parameters: + +- **page** (optional) + Returns a list of all packages in the following format: ```json [ @@ -44,6 +48,15 @@ Returns a list of all packages in the following format: ] ``` +Results are paginated 30 at a time, and links to the next and last pages are +provided in the `Link` header: + +``` +Link: ; rel="self", + ; rel="last", + ; rel="next" +``` + ### Showing package details #### GET /api/packages/:package_name diff --git a/keymaps/linux.cson b/keymaps/linux.cson index 8775c150b..a092ff962 100644 --- a/keymaps/linux.cson +++ b/keymaps/linux.cson @@ -26,6 +26,7 @@ 'ctrl-w': 'core:close' 'ctrl-z': 'core:undo' 'ctrl-y': 'core:redo' + 'ctrl-shift-z': 'core:redo' 'ctrl-x': 'core:cut' 'ctrl-c': 'core:copy' 'ctrl-v': 'core:paste' diff --git a/package.json b/package.json index 8be807f5a..30302854f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.116.0", + "version": "0.118.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { @@ -66,7 +66,8 @@ "atom-dark-ui": "0.32.0", "atom-light-syntax": "0.20.0", "atom-light-ui": "0.28.0", - "base16-tomorrow-dark-theme": "0.19.0", + "base16-tomorrow-dark-theme": "0.20.0", + "base16-tomorrow-light-theme": "0.3.0", "solarized-dark-syntax": "0.21.0", "solarized-light-syntax": "0.11.0", "archive-view": "1.0.0", @@ -113,7 +114,7 @@ "language-css": "0.17.0", "language-gfm": "0.43.0", "language-git": "0.9.0", - "language-go": "0.13.0", + "language-go": "0.14.0", "language-html": "0.22.0", "language-hyperlink": "0.10.0", "language-java": "0.11.0", diff --git a/script/clean b/script/clean index 51e0f0590..236e9f58f 100755 --- a/script/clean +++ b/script/clean @@ -24,6 +24,7 @@ var commands = [ [home, '.atom', 'storage'], [home, '.atom', '.npm'], [home, '.atom', 'compile-cache'], + [home, '.atom', 'atom-shell'], [tmpdir, 'atom-build'], [tmpdir, 'atom-cached-atom-shells'], ]; diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index 4380e70c8..ce85951d9 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -531,7 +531,7 @@ describe "the `atom` global", -> describe ".isReleasedVersion()", -> it "returns false if the version is a SHA and true otherwise", -> version = '0.1.0' - spyOn(atom.constructor, 'getVersion').andCallFake -> version + spyOn(atom, 'getVersion').andCallFake -> version expect(atom.isReleasedVersion()).toBe true version = '36b5518' expect(atom.isReleasedVersion()).toBe false diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index f75220b85..3d8af165f 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -258,7 +258,7 @@ describe "EditorComponent", -> editor.setText "a line that wraps " editor.setSoftWrap(true) runSetImmediateCallbacks() - componentNode.style.width = 16 * charWidth + 'px' + componentNode.style.width = 16 * charWidth + editor.getVerticalScrollbarWidth() + 'px' component.measureHeightAndWidth() runSetImmediateCallbacks() @@ -1697,32 +1697,38 @@ describe "EditorComponent", -> component.measureHeightAndWidth() runSetImmediateCallbacks() + # try to scroll past the top, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 50)) expect(editor.getScrollTop()).toBe 0 expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # scroll to the bottom in one huge event componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -3000)) runSetImmediateCallbacks() - expect(editor.getScrollTop()).toBe editor.getScrollHeight() - editor.getHeight() + 15 + maxScrollTop = editor.getScrollTop() expect(WheelEvent::preventDefault).toHaveBeenCalled() WheelEvent::preventDefault.reset() + # try to scroll past the bottom, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -30)) - expect(editor.getScrollTop()).toBe editor.getScrollHeight() - editor.getHeight() + 15 + expect(editor.getScrollTop()).toBe maxScrollTop expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # try to scroll past the left side, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 50, wheelDeltaY: 0)) expect(editor.getScrollLeft()).toBe 0 expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # scroll all the way right componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -3000, wheelDeltaY: 0)) runSetImmediateCallbacks() - expect(editor.getScrollLeft()).toBe editor.getScrollWidth() - editor.getWidth() + 15 + maxScrollLeft = editor.getScrollLeft() expect(WheelEvent::preventDefault).toHaveBeenCalled() WheelEvent::preventDefault.reset() + # try to scroll past the right side, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -30, wheelDeltaY: 0)) - expect(editor.getScrollLeft()).toBe editor.getScrollWidth() - editor.getWidth() + 15 + expect(editor.getScrollLeft()).toBe maxScrollLeft expect(WheelEvent::preventDefault).not.toHaveBeenCalled() describe "input events", -> @@ -1997,7 +2003,7 @@ describe "EditorComponent", -> expect(componentNode.querySelectorAll('.line')).toHaveLength(4 + lineOverdrawMargin + 1) gutterWidth = componentNode.querySelector('.gutter').offsetWidth - componentNode.style.width = gutterWidth + 14 * charWidth + 'px' + componentNode.style.width = gutterWidth + 14 * charWidth + editor.getVerticalScrollbarWidth() + 'px' advanceClock(component.domPollingInterval) runSetImmediateCallbacks() expect(componentNode.querySelector('.line').textContent).toBe "var quicksort " diff --git a/src/atom.coffee b/src/atom.coffee index 50847f72d..4489d8ba7 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -110,14 +110,6 @@ class Atom extends Model @getCurrentWindow: -> remote.getCurrentWindow() - # Get the version of the Atom application. - @getVersion: -> - @appVersion ?= @getLoadSettings().appVersion - - # Determine whether the current version is an official release. - @isReleasedVersion: -> - not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix - workspaceViewParentSelector: 'body' # Call .loadOrCreate instead @@ -503,11 +495,11 @@ class Atom extends Model # # Returns the version text {String}. getVersion: -> - @constructor.getVersion() + @appVersion ?= @getLoadSettings().appVersion # Public: Determine whether the current version is an official release. isReleasedVersion: -> - @constructor.isReleasedVersion() + not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix # Public: Get the directory path to Atom's configuration area. # diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index 6c56ee106..9e6468e88 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -356,8 +356,10 @@ class DisplayBuffer extends Model if editorWidthInChars isnt previousWidthInChars and @softWrap @updateWrappedScreenLines() + # Returns the editor width in characters for soft wrap. getEditorWidthInChars: -> - width = @getWidth() + width = @width ? @getScrollWidth() + width -= @getVerticalScrollbarWidth() if width? and @defaultCharWidth > 0 Math.floor(width / @defaultCharWidth) else diff --git a/src/editor-component.coffee b/src/editor-component.coffee index fa3939cb6..120616249 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -117,7 +117,7 @@ EditorComponent = React.createClass editor, lineHeightInPixels, defaultCharWidth, lineDecorations, highlightDecorations, showIndentGuide, renderedRowRange, @pendingChanges, scrollTop, scrollLeft, @scrollingVertically, scrollHeight, scrollWidth, mouseWheelScreenRow, invisibles, - visible, scrollViewHeight, @scopedCharacterWidthsChangeCount, lineWidth, @useHardwareAcceleration, + @visible, scrollViewHeight, @scopedCharacterWidthsChangeCount, lineWidth, @useHardwareAcceleration, placeholderText, @performedInitialMeasurement } diff --git a/src/react-editor-view.coffee b/src/react-editor-view.coffee index 80f21ef57..d717359ba 100644 --- a/src/react-editor-view.coffee +++ b/src/react-editor-view.coffee @@ -38,7 +38,7 @@ class ReactEditorView extends View Object.defineProperty @::, 'charWidth', get: -> @editor.getDefaultCharWidth() Object.defineProperty @::, 'firstRenderedScreenRow', get: -> @component.getRenderedRowRange()[0] Object.defineProperty @::, 'lastRenderedScreenRow', get: -> @component.getRenderedRowRange()[1] - Object.defineProperty @::, 'active', get: -> @is(@getPane().activeView) + Object.defineProperty @::, 'active', get: -> @is(@getPane()?.activeView) Object.defineProperty @::, 'isFocused', get: -> @component?.state.focused afterAttach: (onDom) -> diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index 5c45db226..f055a0d45 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -71,7 +71,7 @@ class WorkspaceView extends View projectHome: path.join(fs.getHomeDirectory(), 'github') audioBeep: true destroyEmptyPanes: true - useReactEditor: false + useReactEditor: true @content: -> @div class: 'workspace', tabindex: -1, =>