diff --git a/.gitmodules b/.gitmodules index c7ae0834a..4961f226c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -76,3 +76,6 @@ [submodule "vendor/packages/Go.tmbundle"] path = vendor/packages/Go.tmbundle url = https://github.com/rsms/Go.tmbundle +[submodule "vendor/bootstrap"] + path = vendor/bootstrap + url = https://github.com/twitter/bootstrap diff --git a/.nakignore b/.nakignore index 660678d6b..0a67982e7 100644 --- a/.nakignore +++ b/.nakignore @@ -1,3 +1,4 @@ tags node_modules vendor/packages +.git diff --git a/docs/getting-started.md b/docs/getting-started.md index d869e9506..75c4f21fd 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -6,12 +6,13 @@ about configuring, theming, and extending Atom. ## The Command Palette -If there's one key-command you learn in Atom, it should be `meta-p`. You can -always hit `meta-p` to bring up a list of commands that are relevant to the -currently focused UI element. If there is a key binding for a given command, it -is also displayed. This is a great way to explore the system and get to know the -key commands interactively. If you'd like to add or change a binding for a -command, refer to the [key bindings](#customizing-key-bindings) section to learn how. +If there's one key-command you learn in Atom, it should be `meta-p` (`meta` is +synonymous with the ⌘ key). You can always hit `meta-p` to bring up a list of +commands that are relevant to the currently focused UI element. If there is a +key binding for a given command, it is also displayed. This is a great way to +explore the system and get to know the key commands interactively. If you'd like +to add or change a binding for a command, refer to the [key +bindings](#customizing-key-bindings) section to learn how. ![Command Palette](http://f.cl.ly/items/32041o3w471F3C0F0V2O/Screen%20Shot%202013-02-13%20at%207.27.41%20PM.png) diff --git a/package.json b/package.json index 80eca4b73..15d64f6ce 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "spellchecker": "0.3.0", "pathwatcher": "0.3.0", "plist": "git://github.com/nathansobo/node-plist.git", - "space-pen": "git://github.com/nathansobo/space-pen.git" + "space-pen": "git://github.com/nathansobo/space-pen.git", + "less": "git://github.com/nathansobo/less.js.git" }, "devDependencies" : { diff --git a/script/compile-less.coffee b/script/compile-less.coffee index 805d477d2..8e95d26d9 100644 --- a/script/compile-less.coffee +++ b/script/compile-less.coffee @@ -5,7 +5,7 @@ global.document = global.location = port: 80 -{less} = require '../vendor/less' +less = require 'less' fs = require 'fs' inputFile = process.argv[2] @@ -19,7 +19,19 @@ unless outputFile?.length > 0 process.exit(1) contents = fs.readFileSync(inputFile)?.toString() ? '' -(new less.Parser).parse contents, (e, tree) -> - console.error(e.stack or e) if e - process.exit(1) if e - fs.writeFileSync(outputFile, tree.toCSS()) + +parser = new less.Parser + syncImport: true + paths: [fs.realpathSync("#{__dirname}/../static"), fs.realpathSync("#{__dirname}/../vendor")] + filename: inputFile + +logErrorAndExit = (e) -> + console.error("Error compiling less file '#{inputFile}':", e.message) + process.exit(1) + +parser.parse contents, (e, tree) -> + logErrorAndExit(e) if e + try + fs.writeFileSync(outputFile, tree.toCSS()) + catch e + logErrorAndExit(e) diff --git a/script/copy-files-to-bundle b/script/copy-files-to-bundle index 586db807f..8aaec6ee2 100755 --- a/script/copy-files-to-bundle +++ b/script/copy-files-to-bundle @@ -10,6 +10,5 @@ RESOUCES_PATH="$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" rsync --archive --recursive \ --exclude="src/**.coffee" --exclude="src/**.cson" \ --exclude="src/**.less" --exclude="static/**.less" \ - --exclude="node_modules/less" \ node_modules src static vendor spec benchmark themes dot-atom atom.sh \ "${COMPILED_SOURCES_DIR}/" "$RESOUCES_PATH" diff --git a/spec/app/image-view-spec.coffee b/spec/app/image-view-spec.coffee index 896c70f54..d4dda8920 100644 --- a/spec/app/image-view-spec.coffee +++ b/spec/app/image-view-spec.coffee @@ -8,7 +8,7 @@ describe "ImageView", -> path = project.resolve('binary-file.png') view = new ImageView() view.attachToDom() - view.parent().height(100) + view.height(100) it "displays the image for a path", -> view.setModel(new ImageEditSession(path)) diff --git a/spec/app/select-list-spec.coffee b/spec/app/select-list-spec.coffee index 0e3dec287..ea2b1e7da 100644 --- a/spec/app/select-list-spec.coffee +++ b/spec/app/select-list-spec.coffee @@ -113,7 +113,7 @@ describe "SelectList", -> miniEditor.trigger 'core:move-up' miniEditor.trigger 'core:move-up' - expect(list.scrollBottom()).toBe itemHeight * 3 + expect(list.scrollTop()).toBe itemHeight describe "the core:confirm event", -> describe "when there is an item selected (because the list in not empty)", -> diff --git a/spec/atom-reporter.coffee b/spec/atom-reporter.coffee index c02035cc8..5636647ca 100644 --- a/spec/atom-reporter.coffee +++ b/spec/atom-reporter.coffee @@ -8,7 +8,7 @@ class AtomReporter extends View @div id: 'HTMLReporter', class: 'jasmine_reporter', => @div outlet: 'specPopup', class: "spec-popup" @div outlet: "suites" - @ul outlet: "symbolSummary", class: 'symbolSummary' + @ul outlet: "symbolSummary", class: 'symbolSummary list-unstyled' @div outlet: "status", class: 'status', => @div outlet: "time", class: 'time' @div outlet: "specCount", class: 'spec-count' diff --git a/src/app/atom-package.coffee b/src/app/atom-package.coffee index c7f5cfeb3..9013d461a 100644 --- a/src/app/atom-package.coffee +++ b/src/app/atom-package.coffee @@ -28,7 +28,7 @@ class AtomPackage extends Package else @requireMainModule() catch e - console.warn "Failed to load package named '#{@name}'", e.stack + console.warn "Failed to load package named '#{@name}'", e.stack ? e this activate: ({immediate}={}) -> diff --git a/src/app/buffer-marker.coffee b/src/app/buffer-marker.coffee index 6aa013e01..d232a11cd 100644 --- a/src/app/buffer-marker.coffee +++ b/src/app/buffer-marker.coffee @@ -107,14 +107,13 @@ class BufferMarker handleBufferChange: (bufferChange) -> @consolidateObserverNotifications true, => - @setHeadPosition(@updatePosition(@headPosition, bufferChange, false), clip: false, bufferChanged: true) - @setTailPosition(@updatePosition(@tailPosition, bufferChange, true), clip: false, bufferChanged: true) if @tailPosition + @setHeadPosition(@updatePosition(@headPosition, bufferChange, true), clip: false, bufferChanged: true) + @setTailPosition(@updatePosition(@tailPosition, bufferChange, false), clip: false, bufferChanged: true) if @tailPosition - updatePosition: (position, bufferChange, isFirstPoint) -> + updatePosition: (position, bufferChange, isHead) -> { oldRange, newRange } = bufferChange - return position if oldRange.containsPoint(position, exclusive: true) - return position if isFirstPoint and oldRange.start.isEqual(position) + return position if not isHead and oldRange.start.isEqual(position) return position if position.isLessThan(oldRange.end) newRow = newRange.end.row diff --git a/src/app/config.coffee b/src/app/config.coffee index 455901565..ac44ca272 100644 --- a/src/app/config.coffee +++ b/src/app/config.coffee @@ -21,6 +21,7 @@ class Config themeDirPaths: [userThemesDirPath, bundledThemesDirPath, vendoredThemesDirPath] packageDirPaths: [userPackagesDirPath, vendoredPackagesDirPath, bundledPackagesDirPath] userPackagesDirPath: userPackagesDirPath + lessSearchPaths: [fsUtils.join(resourcePath, 'static'), fsUtils.join(resourcePath, 'vendor')] defaultSettings: null settings: null configFileHasErrors: null diff --git a/src/app/cursor-view.coffee b/src/app/cursor-view.coffee index 3cef15ba2..1bfb5d204 100644 --- a/src/app/cursor-view.coffee +++ b/src/app/cursor-view.coffee @@ -7,7 +7,7 @@ module.exports = class CursorView extends View # Internal: @content: -> - @pre class: 'cursor idle', => @raw ' ' + @div class: 'cursor idle', => @raw ' ' blinkPeriod: 800 editor: null diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 5282bb998..75c441f48 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -730,10 +730,6 @@ class Editor extends View @verticalScrollbar.on 'scroll', => @scrollTop(@verticalScrollbar.scrollTop(), adjustVerticalScrollbar: false) - unless @mini - @gutter.widthChanged = (newWidth) => - @scrollView.css('left', newWidth + 'px') - @scrollView.on 'scroll', => if @scrollView.scrollLeft() == 0 @gutter.removeClass('drop-shadow') @@ -766,7 +762,6 @@ class Editor extends View return if @attached @attached = true @calculateDimensions() - @hiddenInput.width(@charWidth) @setSoftWrapColumn() if @activeEditSession.getSoftWrap() @subscribe $(window), "resize.editor-#{@id}", => @requestDisplayUpdate() @focus() if @isFocused @@ -1108,7 +1103,7 @@ class Editor extends View # Internal: calculateDimensions: -> - fragment = $('