From 54ce852be495d077f100d20331a5328814da454d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 09:27:47 -0700 Subject: [PATCH 1/7] Store nohup.out in ~/.atom Storing it in the temp directory can lead to permissions issues when Atom is run by multiple users. Closes #3056 --- atom.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/atom.sh b/atom.sh index ddeba08d9..2e8d9edd9 100755 --- a/atom.sh +++ b/atom.sh @@ -69,6 +69,11 @@ elif [ $OS == 'Linux' ]; then SCRIPT=$(readlink -f "$0") USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) ATOM_PATH="$USR_DIRECTORY/share/atom/atom" + DOT_ATOM_DIR = "$HOME/.atom" + + if [ ! -d "$DOT_ATOM_DIR" ]; then + mkdir -p "$DOT_ATOM_DIR" + fi : ${TMPDIR:=/tmp} @@ -79,9 +84,9 @@ elif [ $OS == 'Linux' ]; then exit $? else ( - nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$TMPDIR/atom-nohup.out" 2>&1 + nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$DOT_ATOM_DIR/nohup.out" 2>&1 if [ $? -ne 0 ]; then - cat "$TMPDIR/atom-nohup.out" + cat "$DOT_ATOM_DIR/nohup.out" exit $? fi ) & From cc27f2dbb6d065e427bbfbe2675739099e600192 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 09:35:44 -0700 Subject: [PATCH 2/7] Remove spaces around = --- atom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom.sh b/atom.sh index 2e8d9edd9..ec377bd32 100755 --- a/atom.sh +++ b/atom.sh @@ -69,7 +69,7 @@ elif [ $OS == 'Linux' ]; then SCRIPT=$(readlink -f "$0") USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) ATOM_PATH="$USR_DIRECTORY/share/atom/atom" - DOT_ATOM_DIR = "$HOME/.atom" + DOT_ATOM_DIR="$HOME/.atom" if [ ! -d "$DOT_ATOM_DIR" ]; then mkdir -p "$DOT_ATOM_DIR" From d3a46b6bc9516f9002bb0b12a7603471cf87ad96 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 24 Jul 2014 10:26:13 -0700 Subject: [PATCH 3/7] Don't try to update lines/line numbers until after initial measurement Fixes #3047 --- src/editor-component.coffee | 3 ++- src/gutter-component.coffee | 4 +++- src/lines-component.coffee | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 29029756e..c05a88c21 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -95,7 +95,8 @@ EditorComponent = React.createClass GutterComponent { ref: 'gutter', onMouseDown: @onGutterMouseDown, lineDecorations, defaultCharWidth, editor, renderedRowRange, maxLineNumberDigits, scrollViewHeight, - scrollTop, scrollHeight, lineHeightInPixels, @pendingChanges, mouseWheelScreenRow, @useHardwareAcceleration + scrollTop, scrollHeight, lineHeightInPixels, @pendingChanges, mouseWheelScreenRow, + @useHardwareAcceleration, @performedInitialMeasurement } div ref: 'scrollView', className: 'scroll-view', onMouseDown: @onMouseDown, diff --git a/src/gutter-component.coffee b/src/gutter-component.coffee index 01106fa4c..ede951657 100644 --- a/src/gutter-component.coffee +++ b/src/gutter-component.coffee @@ -39,7 +39,7 @@ GutterComponent = React.createClass componentDidMount: -> @appendDummyLineNumber() - @updateLineNumbers() if @props.renderedRowRange? + @updateLineNumbers() if @props.performedInitialMeasurement # Only update the gutter if the visible row range has changed or if a # non-zero-delta change to the screen lines has occurred within the current @@ -59,6 +59,8 @@ GutterComponent = React.createClass false componentDidUpdate: (oldProps) -> + return unless @props.performedInitialMeasurement + unless isEqualForProperties(oldProps, @props, 'maxLineNumberDigits') @updateDummyLineNumber() @removeLineNumberNodes() diff --git a/src/lines-component.coffee b/src/lines-component.coffee index 755e49429..14135089a 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -66,7 +66,8 @@ LinesComponent = React.createClass false componentDidUpdate: (prevProps) -> - {visible, scrollingVertically} = @props + {visible, scrollingVertically, performedInitialMeasurement} = @props + return unless performedInitialMeasurement @clearScreenRowCaches() unless prevProps.lineHeightInPixels is @props.lineHeightInPixels @removeLineNodes() unless isEqualForProperties(prevProps, @props, 'showIndentGuide', 'invisibles') From 7cfdcf0c1baa80522972651cc27605ffd0a3c2a3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 10:39:13 -0700 Subject: [PATCH 4/7] Start caching compiled CSON files Compiling CSON takes ~45 seconds so only compile files that aren't in cache speeding up the build once the cache is primed. --- build/Gruntfile.coffee | 2 ++ build/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index f61ae7261..fed064c76 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -96,6 +96,8 @@ module.exports = (grunt) -> csonConfig = options: rootObject: true + cachePath: path.join(home, '.atom', 'compile-cache', 'grunt-cson') + glob_to_multiple: expand: true src: [ diff --git a/build/package.json b/build/package.json index 8b2d55027..e9ea32ff7 100644 --- a/build/package.json +++ b/build/package.json @@ -17,7 +17,7 @@ "grunt-contrib-coffee": "~0.9.0", "grunt-contrib-csslint": "~0.1.2", "grunt-contrib-less": "~0.8.0", - "grunt-cson": "0.8.0", + "grunt-cson": "0.10.0", "grunt-download-atom-shell": "~0.8.0", "grunt-lesslint": "0.13.0", "grunt-markdown": "~0.4.0", From c03d34f5355b6bb317890271a2b49af2064297df Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 11:21:32 -0700 Subject: [PATCH 5/7] Upgrade to language-c@0.25 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f89af9c3..18843d3b2 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "whitespace": "0.25.0", "wrap-guide": "0.21.0", - "language-c": "0.24.0", + "language-c": "0.25.0", "language-coffee-script": "0.27.0", "language-css": "0.17.0", "language-gfm": "0.43.0", From 76eb3b4c722006215671722783e777ad543963f5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 12:16:28 -0700 Subject: [PATCH 6/7] Prepare 0.119 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18843d3b2..3b527b56e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.118.0", + "version": "0.119.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 15fc7a8bc5dc1a31d6d486f2fd12279ebe3a5f6c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jul 2014 12:23:25 -0700 Subject: [PATCH 7/7] Upgrade to tabs@0.47 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b527b56e..9b692a008 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.46.0", + "tabs": "0.47.0", "timecop": "0.21.0", "tree-view": "0.111.0", "update-package-dependencies": "0.6.0",