Comparar commits

...

1193 Commits

Autor SHA1 Mensagem Data
Nathan Sobo eabad3dcef Use opacity to blink cursor instead of visibility so blink can be styled 2014-08-14 13:20:43 -06:00
Kevin Sawicki 6ad099260e Upgrade to incompatible-packages@0.8 2014-08-14 12:13:30 -07:00
Kevin Sawicki ebfd921807 Update to deprecation-cop@0.9 2014-08-14 12:11:13 -07:00
Kevin Sawicki 83c77b6e4b Upgrade to autosave@0.15 2014-08-14 11:39:16 -07:00
Kevin Sawicki 654a4392a4 📝 Use script/build in --build-dir example 2014-08-14 09:53:10 -07:00
Kevin Sawicki 8457c74f2f 📝 💄 2014-08-14 09:52:20 -07:00
Kevin Sawicki 88366cb5d4 📝 Mention --build-dir and --install-dir
Closes #3220
2014-08-14 09:51:25 -07:00
Kevin Sawicki c70c819aa2 Upgrade to apm 0.91 2014-08-14 09:47:31 -07:00
Kevin Sawicki 4ac8aba31f Merge pull request #3264 from atom/ks-move-checkout-head-to-git-class
Move checkout head to Git class
2014-08-13 19:12:23 -07:00
Kevin Sawicki 776e431cc5 confirmCheckoutHead -> confirmCheckoutHeadRevision 2014-08-13 19:02:09 -07:00
Kevin Sawicki 5a966240b9 Make message map to command name 2014-08-13 18:51:20 -07:00
Kevin Sawicki 27f0c525ac Add since the last Git commit to detailed message 2014-08-13 18:51:19 -07:00
Kevin Sawicki 00170804e5 Remove spec now covered in git spec 2014-08-13 18:51:19 -07:00
Kevin Sawicki d7e5f05f83 💄 2014-08-13 18:51:19 -07:00
Kevin Sawicki 3ce641f53b Move checkout head editor specs to git spec 2014-08-13 18:51:19 -07:00
Kevin Sawicki 27ca957629 revert -> checkoutHead 2014-08-13 18:51:19 -07:00
Kevin Sawicki 84d0abc52c Use same dialog language as GitHub for Mac 2014-08-13 18:51:19 -07:00
Kevin Sawicki 41c62e8628 Add Git::checkoutHeadForEditor
This moves the logic from Editor::checkoutHead
2014-08-13 18:51:19 -07:00
Kevin Sawicki 1515690302 💄 2014-08-13 17:53:54 -07:00
Kevin Sawicki 2be658b894 Use async BrowserWindow::setRepresentedFilename 2014-08-13 17:47:49 -07:00
Kevin Sawicki d3e1c004fb Add status segment to event name 2014-08-13 17:46:23 -07:00
Kevin Sawicki 62924dfcd1 Use async BrowserWindow::setDocumentEdited 2014-08-13 17:44:15 -07:00
Kevin Sawicki 770e97efff Merge pull request #3171 from dmnd/proxy-icon
Add OS X proxy icon to title bar
2014-08-13 17:41:57 -07:00
Kevin Sawicki 2704d2f15a Upgrade to apm 0.90 2014-08-13 17:32:44 -07:00
Kevin Sawicki 957e45944a Upgrade to spell-check@0.41 2014-08-13 17:32:44 -07:00
Nathan Sobo 16fd14d295 Merge pull request #3206 from atom/ns-invisibles-in-tokens
Handle invisibles at the token level to fix char width measurement
2014-08-13 16:59:11 -06:00
Nathan Sobo 20daed176b Don't show invisibles in mini editors
This moves observation of the config keys to Editor, which assigns the
invisibles hash or null on the TokenizedBuffer via the DisplayBuffer to
control whether we render invisibles or not.
2014-08-13 16:32:14 -06:00
Nathan Sobo 8c11c4a4c6 Deprecate EditorComponent::setInvisibles with grim 2014-08-13 16:32:13 -06:00
Nathan Sobo 7cb44b69ef Don't assign defaults to array config values 2014-08-13 16:32:13 -06:00
Nathan Sobo d37cfb9042 Assign default invisible character glyphs via config defaults
This commit also extends config.get to merge default values into the
returned object if both the assigned and default values are objects.
This allows 'atom.invisibles' to be treated as an object that always has
the default values filled in.
2014-08-13 16:32:13 -06:00
Nathan Sobo 986753981d Use config defaults to assign default invisible characters 2014-08-13 16:32:13 -06:00
Nathan Sobo 970bde9361 Run animation frame after toggling invisibles in EditorComponent spec 2014-08-13 16:31:40 -06:00
Nathan Sobo 7b55946abf Make Editor::moveCursorToFirstCharacterOfLine work with invisible chars 2014-08-13 16:31:40 -06:00
Nathan Sobo c74f6bb615 Remove handling of invisibles from EditorComponent 2014-08-13 16:31:40 -06:00
Nathan Sobo 63f2ab3088 Render end-of-line invisibles based on state of TokenizedLine 2014-08-13 16:31:39 -06:00
Nathan Sobo 742ec6df0d Determine the endOfLineInvisibles for each TokenizedLine 2014-08-13 16:31:39 -06:00
Nathan Sobo 864f9bc2b4 Preserve hasLeading/TrailingWhitespace when copying lines w/ invisibles
This fixes the styling of the leading whitespace of folded lines
2014-08-13 16:31:39 -06:00
Nathan Sobo 73896d100e Add specs for firstNonWhitespaceIndex and firstTrailingWhitespaceIndex 2014-08-13 16:31:39 -06:00
Nathan Sobo 193001d793 Assign invisibles via config in editor-view-spec 2014-08-13 16:31:39 -06:00
Nathan Sobo 052f9580f2 Render correct classes on leading/trailing whitespace spans 2014-08-13 16:31:39 -06:00
Nathan Sobo 2daf70f0e5 Handle invisibles at the token level to fix char width measurement
Fixes #3188
2014-08-13 16:31:39 -06:00
Kevin Sawicki fca9ed07e6 Merge pull request #3169 from lee-dohm/ld-checkout-head
Add confirmation dialog to checkoutHead
2014-08-13 15:24:06 -07:00
Ben Ogle c6fc0d050d Upgrade text-buffer and atom-keymap for grim upgrade 2014-08-13 14:40:53 -07:00
Kevin Sawicki 6e913c47ef Upgrade to language-sass@0.16 2014-08-13 14:39:17 -07:00
Ben Ogle a245624211 Upgrade deprecation-cop to add status item 2014-08-13 13:57:03 -07:00
Ben Ogle 8af8caca55 Upgrade to grim 0.12.0 2014-08-13 13:50:19 -07:00
Ben Ogle bbeb4be5b1 Fix the status bar nested inline blocks.
They were 1 - 2px too low due to nesting inline-blocks.
2014-08-13 13:42:46 -07:00
Ben Ogle 449da91216 Add toShow matcher 2014-08-13 13:42:46 -07:00
Kevin Sawicki 521647e8ac Upgrade to incompatible-packages@0.7 2014-08-13 13:42:19 -07:00
Kevin Sawicki d863638c24 Upgrade to archive-view@0.36 2014-08-13 12:43:42 -07:00
Kevin Sawicki 651df12f9b Upgrade to bracket-matcher@0.54 2014-08-13 11:19:55 -07:00
Kevin Sawicki 83706647d1 Prepare 0.122 2014-08-13 10:01:35 -07:00
Cheng Zhao 59fb4a839e Merge pull request #3248 from atom/atom-shell-0.15.6
Uprade to atom-shell@0.15.6
2014-08-13 20:25:03 +08:00
Cheng Zhao 04e23f581a Uprade to atom-shell@0.15.6 2014-08-13 20:13:57 +08:00
Kevin Sawicki 4574a9e35d Upgrade to language-html@0.24 2014-08-12 18:56:08 -07:00
Kevin Sawicki a2eb4d9303 Keep Packages submenu sorted
This ensures packages are in a predictable order regardless of whether
they are bundled or installed to ~/.atom/packages

Closes #3155
2014-08-12 18:16:00 -07:00
Kevin Sawicki c0a845bc56 Don't run ~/.atom/packages specs when in safe mode
Closes #3215
2014-08-12 17:49:33 -07:00
Kevin Sawicki 1ace5a313c Upgrade to dev-live-reload@0.34 2014-08-12 17:18:55 -07:00
Ben Ogle 161eb3c3d2 Upgrade autocomplete and go-to-line to fix preempt 2014-08-12 17:10:37 -07:00
Ben Ogle 6632a1c63d Merge pull request #3244 from atom/bo-stop-propagation
Stop propagation on all commands in the editor
2014-08-12 17:08:22 -07:00
Ben Ogle ce5eff100c Stop propagation on all commands 2014-08-12 16:54:43 -07:00
Kevin Sawicki 1bf9e14f9f Upgrade to language-xml@0.18 2014-08-12 16:44:10 -07:00
Nathan Sobo 94f40f0ed9 Only allow ReactEditorView::beforeRemove to run once 2014-08-12 17:40:53 -06:00
Nathan Sobo 640881a15e Destroy the editor when an EditorComponent is unmounted
Fixes #3222
2014-08-12 17:40:53 -06:00
Kevin Sawicki ee6c4d7b65 Merge pull request #3243 from kaiserfro/remove-unnecessary-getScrollWidth-params
Remove unnecessary params from Editor::getScrollWidth
2014-08-12 16:35:54 -07:00
Jeffrey Oliver a37aeba909 Remove unnecessary params from Editor::getScrollWidth 2014-08-12 16:33:22 -07:00
Kevin Sawicki 2449fda01d Merge pull request #3230 from atom/ks-really-kill-buffered-process-on-windows
Really kill buffered processes on windows
2014-08-12 16:30:30 -07:00
Kevin Sawicki b572594f92 Ignore errors from process object 2014-08-12 16:15:42 -07:00
Kevin Sawicki fbde059748 Ignore errors killing child processes 2014-08-12 16:15:42 -07:00
Kevin Sawicki 6084ef52e7 Ensure pid is positive 2014-08-12 16:15:42 -07:00
Kevin Sawicki a9f4dfc6b7 Split on whitespace when parsing pids 2014-08-12 16:15:42 -07:00
Kevin Sawicki 8032d6dab2 Return undefined from BufferedProcess::kill 2014-08-12 16:15:42 -07:00
Kevin Sawicki 01ec449fce Kill parent process after children on Windows 2014-08-12 16:15:42 -07:00
Kevin Sawicki e79d66497c Remove comment about killing process 2014-08-12 16:15:41 -07:00
Kevin Sawicki a205c6d190 Use wmic to kill child processes 2014-08-12 16:15:41 -07:00
Nathan Sobo 2911b395ee Handle 'focus' events in ReactEditorView and transfer to the component
Fixes #3234
2014-08-12 17:15:19 -06:00
Nathan Sobo 64c25f17df Shim ReactEditorView::mini property 2014-08-12 17:15:19 -06:00
Ben Ogle 9d3082ec95 Upgrade autocomplete to fix #3242 2014-08-12 16:07:05 -07:00
Ben Ogle 034a377c5e Merge pull request #3241 from atom/bo-add-will-insert
Add will-insert-event with cancel() function
2014-08-12 16:03:10 -07:00
Ben Ogle f0fbdc9842 Revert "Sometimes there might not be a selection."
This reverts commit a73e6e5bd0.
2014-08-12 15:54:32 -07:00
Ben Ogle 96804096e9 Fix specs 2014-08-12 15:44:58 -07:00
Ben Ogle e2c41136f3 preventDefault -> cancel() 2014-08-12 15:35:54 -07:00
Ben Ogle 8b20e2e031 Remove duplicate getModel() 2014-08-12 15:32:18 -07:00
Ben Ogle 722d8cb48b Need to return a range when the text is inserted 2014-08-12 15:30:19 -07:00
Ben Ogle a73e6e5bd0 Sometimes there might not be a selection. 2014-08-12 15:30:02 -07:00
Ben Ogle 4cf68ef017 ::getModel() returns the editor 2014-08-12 15:29:47 -07:00
Ben Ogle b037395551 Add will-insert-text and did-insert-text to insertText() 2014-08-12 15:28:26 -07:00
Ben Ogle 7a26a16511 Only focus when the component is mounted 2014-08-12 15:28:13 -07:00
Kevin Sawicki 30fc3d9e66 Merge pull request #3240 from atom/ks-drop-num-pad-support
Remove number pad support
2014-08-12 15:02:15 -07:00
Ben Ogle 7de2ad34aa Remove opaque backgrounds on mini editors
Fixes #3239
2014-08-12 14:53:09 -07:00
Kevin Sawicki 1bba631ab7 Remove num- keybindings 2014-08-12 14:51:53 -07:00
Kevin Sawicki cbf4087a3a Upgrade to atom-keymap 2.0 2014-08-12 14:51:19 -07:00
Kevin Sawicki a3d72f5e6a Upgrade to bracket-matcher@0.53 2014-08-12 14:27:46 -07:00
Kevin Sawicki aeaa2fad06 Upgrade to atom-package-manager@0.89 2014-08-12 13:07:55 -07:00
Kevin Sawicki a219b90eea Upgrade to exception-reporting@0.20 2014-08-12 13:01:03 -07:00
Kevin Sawicki 7086c60e6b Upgrade to git-utils@2.1.4 2014-08-12 12:48:23 -07:00
Kevin Sawicki 0af4c82f36 Upgrade to settings-view@0.139 2014-08-12 12:44:42 -07:00
Kevin Sawicki acf5ab816e Bump grunt-coffeelint for JSON fix 2014-08-12 10:45:39 -07:00
Kevin Sawicki 6aa8c8bab9 Go back to using grunt-coffeelint fork for CI fixes 2014-08-12 10:37:13 -07:00
Kevin Sawicki b5c939dee1 Upgrade to incompatible-packages@0.6 2014-08-12 10:25:18 -07:00
Kevin Sawicki 90d9315d45 Merge pull request #3223 from atom/ks-use-beforeunload
Save state during beforeunload event
2014-08-12 10:22:03 -07:00
Kevin Sawicki 7de2f57088 💄 2014-08-12 09:37:48 -07:00
Kevin Sawicki 1488867063 Remove hiding of body during reload
This appears to no longer be needed on Chrome 36
2014-08-12 08:49:28 -07:00
Kevin Sawicki 59d62d48db Remove views and destroy project during unload 2014-08-12 08:49:28 -07:00
Kevin Sawicki 97c2fc09f0 Only unload editor window when confirmed 2014-08-12 08:49:28 -07:00
Kevin Sawicki 16d2e41309 Use beforeunload instead of unload
unload is asynchronous in Chrome 36 and so saving the state while
reloading may not happen before the state is read on the new render
process.
2014-08-12 08:49:28 -07:00
Lee Dohm 13f66fb2ae Add a step to revert unsaved changes
I took the key part from PR #3183 and added it to the post-confirmation
flow.
2014-08-12 00:37:51 -07:00
Lee Dohm d6a8217e94 Add config option for checkoutHead confirmation
Per the discussion with @kevinsawicki in #3168, I have added a config
option `editor.confirmCheckoutHead` that defaults to `true`. When the
`editor:checkout-head-revision` command is executed, a confirmation
dialog now shows that states which file is to be reverted and asks the
user to "Revert" or "Cancel". If the config option is set to `false`,
the old behavior, simply reverting without prompting, is used.

I also added tests to ensure that the confirmation dialog is displayed
or not in the right configurations.
2014-08-12 00:19:47 -07:00
Lee Dohm 8e649e3008 Add confirmation dialog to checkoutHead
There have been a few reports of files mysteriously going back to the
last version in the tree. My theory is that it is because of people
fat-fingering the Undo command because the default keyboard mapping is
too similar. This will at least prevent most accidental data loss.
2014-08-11 20:58:42 -07:00
Kevin Sawicki 8dffb45fd7 Upgrade to language-c@0.27 2014-08-11 20:34:37 -07:00
Kevin Sawicki c34ce0d2d0 Merge pull request #3218 from dmnd/coffeelint-config-file
Move coffeelint settings to external file
2014-08-11 16:41:42 -07:00
Desmond Brand 61daf1cc36 Use grunt-coffeelint@0.0.13 instead of forked version
Test Plan:

```
$ ./script/grunt coffeelint
Running "coffeelint:src" (coffeelint) task
>> 80 files lint free.

Running "coffeelint:build" (coffeelint) task
>> 23 files lint free.

Running "coffeelint:test" (coffeelint) task
>> 40 files lint free.
Done, without errors.
```
2014-08-11 16:38:24 -07:00
Desmond Brand 1201fb6a5d ignore no_unnecessary_fat_arrows too 2014-08-11 16:32:13 -07:00
Kevin Sawicki 7a5a329393 Upgrade to language-sass@0.15 2014-08-11 15:33:10 -07:00
Kevin Sawicki f447781e01 Allow any bundled theme when in safe mode
Check enabled names against the bundled names and ensure
one bundled UI and one bundled syntax theme are enabled,
defaulting to the dark themes when necessary.
2014-08-11 15:24:49 -07:00
Kevin Sawicki 070d9d0b46 Merge pull request #3186 from maschs/ms-safeModeThemes
Load the default themes in safe mode
2014-08-11 14:51:14 -07:00
Kevin Sawicki 49b4671076 Merge pull request #3208 from XemsDoom/fix-win32-buffprocess
Fixes additional quotes on win32 in BufferedProcess
2014-08-11 14:45:08 -07:00
Luca Moser 28a0e94bb9 Fixes unexecutable commands on win32 in BP
Signed-off-by: Luca Moser <moser.luca@gmail.com>
2014-08-11 20:24:57 +02:00
Kevin Sawicki ab2c5bfc35 Upgrade to bracket-matcher@0.52 2014-08-11 11:21:03 -07:00
Ben Ogle 80c64deb21 Merge pull request #3219 from wernight/patch-1
Update linux.md
2014-08-11 11:06:33 -07:00
Kevin Sawicki 69af432965 Upgrade to base16-tomorrow-dark-theme 2014-08-11 09:41:59 -07:00
Cheng Zhao e788612ef4 Merge pull request #3196 from atom/atom-shell-v0.15.4
Upgrade to atom-shell@0.15.4
2014-08-11 21:24:15 +08:00
Cheng Zhao 62803efde0 Upgrade to atom-shell@0.15.5 2014-08-11 20:54:43 +08:00
Cheng Zhao 01696b4d11 Revert "Make menu bar auto-hide."
This reverts commit 64731bff46.
2014-08-11 20:54:26 +08:00
Werner Beroux 2c2dc61fa0 Update linux.md
Clarify the build steps. The most important is that initialy "Create ..." and "Install ..." could be interpreted as "(User should) create/install ..." while it should mean "(To) create/install ... (do)".
2014-08-11 11:00:47 +02:00
Desmond Brand 66ce001961 Move coffeelint settings to external file
The motivation is for this is to allow `coffeelint` config to be shared by
`script/grunt coffeelint`, global `coffeelint` and inline linting via
`AtomLinter`.

Test Plan:

Made some deliberate lint errors then ran `script/grunt coffeelint` and
verified the output looked the same with and without this change.
2014-08-10 21:41:55 -07:00
Kevin Sawicki 3aa6cc827c Upgrade to markdown-preview@0.99 2014-08-08 11:44:47 -07:00
Maximilian Schüßler c2304e1124 Fix indentation 2014-08-08 19:59:45 +02:00
Kevin Sawicki 07f8f0915c Upgrade to language-sql@0.10 2014-08-08 10:35:58 -07:00
Kevin Sawicki 7725c78c5e Upgrade to language-yaml@0.15 2014-08-08 09:45:28 -07:00
Ivan Žužak 0624720634 Upgrade to markdown-preview@0.97.0 2014-08-08 17:59:57 +02:00
Cheng Zhao 64731bff46 Make menu bar auto-hide. 2014-08-07 21:24:20 +08:00
Cheng Zhao 878c393e8e Upgrade to atom-shell@0.15.4 2014-08-07 20:30:20 +08:00
Nathan Sobo 84064a811c :non_potable_water: Unsubscribe from window resize in EditorComponent
This fixes a major memory leak
2014-08-07 04:59:02 -06:00
Cheng Zhao 3c932d6d91 Upgrade to atom-shell@0.15.3 2014-08-07 00:11:40 +08:00
Ben Ogle a24d1d1af7 Upgrade find-and-replace 2014-08-05 11:31:58 -07:00
Ben Ogle edb5b43d64 Upgrade settings view for #3176 2014-08-05 11:20:38 -07:00
Ben Ogle ac496e1fa4 Upgrade tabs to fix hanging in #1663 2014-08-05 10:54:57 -07:00
Ben Ogle 103f3f8597 Merge pull request #3185 from sryze/patch-1
Add build fix from #2435
2014-08-05 10:17:24 -07:00
Kevin Sawicki 9842baedce Use Atom as FileDescription
This is the text presented when the app is presented in a select list.

Closes #3179
2014-08-05 07:59:02 -07:00
Kevin Sawicki aaa916f78d Upgrade to language-coffee-script@0.29 2014-08-05 07:52:49 -07:00
Maximilian Schüßler b463d9d876 Load the default themes in safe mode 2014-08-05 13:32:16 +02:00
Sergey Zolotarev 7f6a4cccaf Add build fix from #2435 2014-08-05 18:00:25 +07:00
Desmond Brand d5e30e83f6 Don't use project path as fallback icon for item with no path
Stops the project folder icon appearing in places that don't make sense
like settings and new files.

Test Plan:

  * Opened settings and didn't see the project folder icon
  * Closed all tabs and saw the project folder icon
2014-08-04 20:51:37 -07:00
Desmond Brand d16c0e9e41 Implement setDocumentEdited too
As requested by @philipgiuliani

Test Plan:
Opened an existing file and made a modification. The icon fades at the same
time the tab close button changes to a circle. Undo makes the icon opaque
again.
2014-08-04 20:45:24 -07:00
Desmond Brand bd8ac3bb32 path -> proxyIconPath
Test plan:
Crossed fingers
2014-08-04 11:28:29 -07:00
Kevin Sawicki 87edff1e42 Upgrade to language-gfm@0.46 2014-08-04 11:09:42 -07:00
Kevin Sawicki 96f35d3cde Upgrade to language-ruby@0.34 2014-08-04 11:09:41 -07:00
Nathan Sobo 7e45ffa4c3 Center around the cursor in Editor::scrollToCursorPosition by default
Fixes #3131
2014-08-04 11:58:07 -06:00
Kevin Sawicki 6af69b0fc7 Merge pull request #3164 from Bengt/patch-1
Correct Node.js' spelling, link Git and GNOME Keyring
2014-08-04 10:39:12 -07:00
Cheng Zhao 99e02570d1 Upgrade to atom-shell@0.15.2 2014-08-04 22:12:44 +08:00
Desmond Brand e1f4b7415a Add OS X proxy icon to title bar
Fixes #1891.

Test Plan:

  * Opened Atom window in directory, verified directory icon shows up
  * Opened a file and verified icon changed
  * Right clicked icon, verified menu appears
  * Drag file to terminal and it pastes the file path (yay)
  * Opened a new Atom window and opened some files in that to make sure that
    it didn't change the original window

I didn't add any specs for this - advice welcome here. I also haven't tested
on Windows or Linux but it looks like `setRepresentedFilename` is a noop on
those platforms.
2014-08-03 17:14:17 -07:00
Bengt Lüers 823cfcac57 Correct Node.js' spelling, link Git and GNOME Keyring 2014-08-03 16:06:18 +02:00
Nathan Sobo de6ccd8c08 Merge pull request #3146 from atom/ns-latency
Improve cursor movement and typing latency a bit
2014-08-02 09:21:51 -07:00
Ben Ogle 2135d3be83 Update statusbar to add toggle 2014-08-01 10:22:14 -07:00
Nathan Sobo 1c3720c160 Upgrade keybinding-resolver for spec fix 2014-07-31 15:23:58 -06:00
Nathan Sobo 6c72b13adc Upgrade keymap to avoid temp objects in keystrokeForKeyboardEvent 2014-07-31 15:21:37 -06:00
Kevin Sawicki 1404904d24 Upgrade to language-gfm@0.45 2014-07-31 14:15:01 -07:00
Nathan Sobo db243936b4 Update emissary for Emitter::emit optimization 2014-07-31 15:11:25 -06:00
Nathan Sobo 6e72627e9e Stop propagation of keydown/textInput events to prevent React handler
React's global synthetic event handler is somewhat expensive. This
prevents it from being invoked on every keystroke, saving ~1ms.
2014-07-31 15:11:06 -06:00
Kevin Sawicki 3d36ba7ecc Upgrade to scrollbar-style 1.0.2 2014-07-31 13:30:27 -07:00
Kevin Sawicki a7c0d6073f Upgrade to markdown-preview@0.95 2014-07-31 13:24:18 -07:00
Kevin Sawicki f25b468272 Upgrade to apm 0.88 2014-07-31 13:07:44 -07:00
Kevin Sawicki 2d0fb8ee6b Upgrade to incompatible-packages@0.5 2014-07-31 09:19:15 -07:00
Kevin Sawicki d875becc7a Upgrade to snippets@0.51 2014-07-31 09:06:38 -07:00
Kevin Sawicki cb72af63fd Upgrade to language-yaml@0.14 2014-07-31 08:57:09 -07:00
Kevin Sawicki f7187f1d5a Spy on atom.inDevMode() 2014-07-31 08:42:31 -07:00
Kevin Sawicki 700acdc5a2 Upgrade to incompatible-packages@0.4 2014-07-31 08:37:18 -07:00
Kevin Sawicki 18016ae9df 💄 Use unless instead of if not 2014-07-31 08:33:36 -07:00
Kevin Sawicki a30faa5bea Merge pull request #3139 from maschs/ms-incompatibleModulesDev
In devmode do not load incompatible modules from cache
2014-07-31 08:32:58 -07:00
Kevin Sawicki 05a113bb7a Merge pull request #3120 from atom/ks-remove-vendored-dlls
Remove vendored dlls
2014-07-31 08:32:53 -07:00
Kevin Sawicki f5d4ece9cd Remove vendored dlls
These are now provided by atom-shell
2014-07-31 08:20:33 -07:00
Cheng Zhao 3bda37c56c Upgrade to atom-shell@0.15.1 2014-07-31 23:19:50 +08:00
Maximilian Schüßler 62b52cb70a In devmode do not load incompatible from cache 2014-07-31 16:24:29 +02:00
Kevin Sawicki a4fe594441 Upgrade to apm 0.87 2014-07-30 17:42:32 -07:00
Kevin Sawicki 9d0e46126b Upgrade to language-coffee-script@0.28 2014-07-30 16:24:54 -07:00
Kevin Sawicki cb1bb4a691 Upgrade to apm 0.86 2014-07-30 10:55:18 -07:00
Kevin Sawicki d3a24c3749 Upgrade to runas 1.0.1 2014-07-30 10:54:23 -07:00
Kevin Sawicki 092849835e Upgrade to pathwatcher 2.0.6 2014-07-30 10:49:45 -07:00
Nathan Sobo b24ade4de5 Upgrade to React 0.11.1 2014-07-29 21:26:21 -06:00
Nathan Sobo 0f77a2eef9 Only unmount ReactEditorView's component before removing if its mounted
Fixes #3108

Unmounting the component the first time can cause a focusout event,
which leads to a redundant removal and an attempt to unmount again. This
protects against that.
2014-07-29 20:02:01 -06:00
Kevin Sawicki 662c2fc9d3 Upgrade to apm 0.85 2014-07-29 17:22:13 -07:00
Kevin Sawicki 510b1a7068 Upgrade to symbols-view@0.63 2014-07-29 17:22:13 -07:00
Kevin Sawicki c4f9914df6 Upgrade to scrollbar-style 1.0.1 2014-07-29 17:22:13 -07:00
Kevin Sawicki 2140ce3beb Upgrade to pathwatcher 2.0.5 2014-07-29 17:22:13 -07:00
Kevin Sawicki a597bca75e Upgrade to oniguruma 3.0.3 2014-07-29 17:22:12 -07:00
Kevin Sawicki 2895aae121 Upgrade to spell-check@0.40 2014-07-29 17:22:12 -07:00
Kevin Sawicki 4e20d93f03 Upgrade to oniguruma 3.0.2 2014-07-29 17:22:12 -07:00
Kevin Sawicki 1cc4e2e045 Upgrade to nslog@1.0.1 2014-07-29 17:22:12 -07:00
Kevin Sawicki 9fb427c468 Upgrade to git-utils 2.1.3 2014-07-29 17:22:12 -07:00
Nathan Sobo a9bd061144 Un-f 2014-07-29 16:52:21 -06:00
Nathan Sobo 0736b28abf Merge pull request #3102 from dmnd/export-atom-react
Export Atom's version of React and Reactionary
2014-07-29 15:43:53 -06:00
Ben Ogle 9ac5b67b6e Merge pull request #3121 from atom/bo-style-mini
Style mini editors
2014-07-29 13:39:49 -07:00
Ben Ogle 25601d691d Pull the mini editor styles out from react rule 2014-07-29 13:07:07 -07:00
Ben Ogle 0d1c11764b Upgrade dark-ui theme for new variable 2014-07-29 12:54:49 -07:00
Ben Ogle 729ff461f1 Upgrade settings-view for mini editor changes 2014-07-29 12:46:01 -07:00
Ben Ogle 0360a1918c Upgrade atom-light-ui for mini editor fixes 2014-07-29 12:33:01 -07:00
Ben Ogle 23f21bcda2 Style the mini editors for a constant height
Adds an @input-font-size variable.
2014-07-29 12:31:34 -07:00
Ben Ogle 800d65e3de Absolutify the placeholder text in mini editors.
Fixes #3118
2014-07-29 12:19:16 -07:00
Ben Ogle 5ce9b3ac55 Upgrade solarized syntax themes for scala support 2014-07-29 10:37:11 -07:00
Kevin Sawicki f86191dff8 Upgrade to incompatible-packages@0.3 2014-07-29 09:26:38 -07:00
Cheng Zhao 412793697f Merge pull request #3112 from atom/chrome36
Upgrade to Chrome36
2014-07-29 14:44:34 +08:00
Cheng Zhao 3274ef9fb9 Upgrade to atom-shell@0.15.0 2014-07-29 14:27:32 +08:00
Nathan Sobo f8e2231dfc Increase overdraw margin to avoid intermittent full screen repaints
On Chromium 35, the screen seems to be full-screen painting on a Cinema
Display every few frames, causing frame rates to drop from 60 to 30 when
autoscrolling with the cursor. Increasing the overdraw avoids this.
2014-07-28 21:57:06 -06:00
Nathan Sobo 837eaccd16 Remove extra nextAnimationFrame call 2014-07-28 21:53:18 -06:00
Nathan Sobo 4f3570b56b Merge pull request #3106 from atom/ns-react-css-font-styling
Apply React editor font styles via CSS instead of inline styles
2014-07-28 21:08:51 -06:00
Nathan Sobo 8918a42b3b Merge pull request #3104 from dmnd/react-dev-mode
Show detailed React errors/warnings in devMode
2014-07-28 21:02:11 -06:00
Nathan Sobo bd77a02207 Measure DOM in EditorComponent when a stylesheet is updated 2014-07-28 21:00:15 -06:00
Nathan Sobo eebbb99fc8 Handle editor font config options with a global stylesheet
Previously, each editor observed font-related config values on its own
and applied inline styles to honor them. This made it difficult to style
the editor like a normal element with CSS.

Moving this to a global stylesheet that targets editors via the .editor
selector means that the font size setting can be overridden in specific
contexts, such as when using mini editors.
2014-07-28 21:00:15 -06:00
Nathan Sobo 2b27c0b440 Only handle stylesheet changes after initial measurement 2014-07-28 20:59:28 -06:00
Nathan Sobo 8e69b0c4a0 Base font styling on the computed style of the editor element
Previously, font styling was always explicitly assigned via the config.
This commit is the first step in basing the font styling of the editor
on the styles assigned via CSS. This will allow the editor's
font-family, font-size, and line-height to be assigned via CSS just like
they are for any other element, which will make it easier to style mini
editors.

We still need to switch the font settings to adjust a global stylesheet
rather than updating inline styles on each editor individually.
2014-07-28 20:59:28 -06:00
Kevin Sawicki 532744b4eb 📝 Mention installed apm command 2014-07-28 18:49:53 -07:00
Kevin Sawicki ddd89ed6d1 📝 Remove step that is only is supported on Mac 2014-07-28 18:49:03 -07:00
Kevin Sawicki 5a53e5b96a 📝 Mark mdkeb step as optional 2014-07-28 18:48:15 -07:00
Kevin Sawicki 69f84f7e6d Merge pull request #2680 from Bengt/patch-1
individual descriptions for instructions
2014-07-28 18:46:51 -07:00
Kevin Sawicki e2c65345ab Upgrade to language-javascript@0.39 2014-07-28 18:43:32 -07:00
Bengt Lüers f47bcddf10 individual descriptions for instructions 2014-07-29 02:33:02 +02:00
Kevin Sawicki 5e19230809 Upgrade to language-javascript@0.38 2014-07-28 17:31:46 -07:00
Kevin Sawicki f8961fbd53 Upgrade to autocomplete@0.29 2014-07-28 17:19:45 -07:00
Kevin Sawicki bef750cb1f Upgrade to fs-plus 2.2.6 2014-07-28 17:11:21 -07:00
Kevin Sawicki 4e2f06aec7 Merge pull request #3098 from Bengt/patch-2
Update linux.md
2014-07-28 16:51:09 -07:00
Kevin Sawicki 02c47ba1ea 💄 2014-07-28 16:49:08 -07:00
Kevin Sawicki f6cb59be47 Merge pull request #3062 from ehuss/win32-sourcemaps
Fix source maps for CoffeeScript on Windows.
2014-07-28 16:44:06 -07:00
Kevin Sawicki 397871a012 Upgrade to language-gfm@0.44 2014-07-28 16:04:11 -07:00
Kevin Sawicki 10239e0466 Upgrade to fs-plus 2.2.5 2014-07-28 16:03:18 -07:00
Kevin Sawicki 69ef99481b Upgrade to language-source@0.8 2014-07-28 15:37:59 -07:00
Kevin Sawicki fc20de82ce Downgrade to tree-view@0.112 2014-07-28 15:34:41 -07:00
Kevin Sawicki 0232da27f5 Downgrade to symbols-view@0.62 2014-07-28 15:30:42 -07:00
Kevin Sawicki ba452e2400 Downgrade to 0.39.0 2014-07-28 15:25:07 -07:00
Kevin Sawicki 9b5b8e7528 Downgrade to snippets@0.50 2014-07-28 15:18:27 -07:00
Kevin Sawicki 6e65947d54 Downgrade to link@0.25 2014-07-28 15:12:47 -07:00
Kevin Sawicki 93c5e241f3 Downgrade to markdown-preview@0.94 2014-07-28 15:10:32 -07:00
Kevin Sawicki e0c61136a6 Upgrade to dev-live-reload@0.33 2014-07-28 15:07:50 -07:00
Kevin Sawicki c5cc13ddb3 Downgrade to bracket-matcher@0.51 2014-07-28 15:03:54 -07:00
Kevin Sawicki fd47c89f9d Add trailing .0 for consistency 2014-07-28 15:01:25 -07:00
Kevin Sawicki 34ad902cb3 Downgrade to archive-view 0.35 2014-07-28 15:00:52 -07:00
Kevin Sawicki 9678418e56 Downgrade to apm 0.84 2014-07-28 14:58:49 -07:00
Kevin Sawicki 691d6c3b5f Merge pull request #3032 from atom/chrome35
Upgrade to Chrome 35
2014-07-28 14:52:34 -07:00
Kevin Sawicki 431555195a Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-28 14:40:14 -07:00
Kevin Sawicki b0aa5e6c88 Prepare 0.121 2014-07-28 14:36:07 -07:00
Kevin Sawicki b3c2417578 Upgrade to exception-reporting@0.19 2014-07-28 14:08:13 -07:00
Nathan Sobo 7f882b00f5 Don't allow updates to be requested for unmounted components
In 444c18be34, I stopped polling the DOM
when an update was pending to prevent delay of the next animation frame.

Unfortunately, we rely on synchronously polling the DOM when an editor
view is attached to perform the initial measurement of the default char
width, which is required to position the wrap guide.

In componentWillMount, observing the config was requesting an update,
causing us to skip this synchronous update at attachment time and
position the wrap guide wrong.

This prevents update requests that occur before mount from pausing the
polling that we perform on attachment, restoring correct function to the
wrap guide.
2014-07-28 14:42:35 -06:00
Nathan Sobo 3a9aa80914 Add ReactEditorView::lineElementForScreenRow shim 2014-07-28 11:36:40 -06:00
Kevin Sawicki 3af3a0d27e Upgrade to incompatible-packages@0.2 2014-07-28 10:25:08 -07:00
Kevin Sawicki 7e415ffdb7 Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-28 09:02:38 -07:00
Kevin Sawicki e70c696fef Upgrade to tabs@0.48 2014-07-28 09:00:54 -07:00
Kevin Sawicki b2258d9b8a Merge pull request #3096 from marcbachmann/patch-1
Remove duplicate addUrlToOpen() in browser/main.coffee
2014-07-28 08:51:18 -07:00
Kevin Sawicki 40eab806c4 Upgrade to base16-tomorrow-light-theme@0.4 2014-07-28 08:49:28 -07:00
Kevin Sawicki 319455f2da Upgrade to language-xml@0.17 2014-07-28 08:45:18 -07:00
Kevin Sawicki 63867ba803 Upgrade to language-go@0.16 2014-07-28 08:43:52 -07:00
Desmond Brand 65ffd21574 Show detailed React errors/warnings in devMode
Fixes #3099.

React development mode has a lot of useful warnings and exceptions. These don't
show up in production mode. This change puts React into dev mode when Atom is
run via `atom --dev`.
2014-07-27 16:10:47 -07:00
Nathan Sobo 393552a4b6 Take cursors off the GPU and position them on the lines layer
The compositor overhead is not worth it.
2014-07-27 11:47:33 -06:00
Nathan Sobo 444c18be34 Stop polling when an update is pending 2014-07-27 11:46:22 -06:00
Nathan Sobo dca096b8e3 Use requestAnimationFrame to batch updates in Chrome 35
In Chrome 31, setImmediate was yielding better behavior. But now Chrome
35 seems to behave more smoothly when we use requestAnimationFrame, and
the delay for keystrokes is non-existent.
2014-07-27 11:46:22 -06:00
Nathan Sobo 57a03e7884 Kill dummy highlight component now that Chrome 35 fixes render artifact
Previously, removing the last highlight caused rendering artifacts.
Chrome 35 no longer exhibits this problem so we can remove this
workaround.
2014-07-27 11:46:22 -06:00
Cheng Zhao fe1819f587 Revert "Don't start crash reporter on Windows."
This reverts commit 684f15ab89.
2014-07-27 11:07:36 +08:00
Cheng Zhao aa157af93e Upgrade to atom-shell@0.14.3 2014-07-27 11:07:07 +08:00
Desmond Brand 0e58e03de7 Export Atom's version of React and Reactionary
Fixes #3101 and works around facebook/react#1939.
2014-07-26 17:49:51 -07:00
Bengt Lüers e011c80b07 Update linux.md
Add step for checking out the latest release by git tag.
2014-07-26 18:44:38 +02:00
Marc Bachmann 9ae007a6d7 Remove duplicate addUrlToOpen() in browser/main.coffee
I don't think that this was the desired behaviour.
I do not know if that caused a bug.
2014-07-26 10:54:15 +02:00
Kevin Sawicki 9dc59b9807 💄 2014-07-25 17:12:03 -07:00
Kevin Sawicki 15689ebfb5 📝 2014-07-25 17:11:33 -07:00
Kevin Sawicki 6250419fcb containsNativeModule -> isNativeModule 2014-07-25 17:09:46 -07:00
Kevin Sawicki 70621afe62 📝 2014-07-25 17:08:10 -07:00
Kevin Sawicki 6f29710d88 Upgrade to incompatible-packages@0.1 2014-07-25 17:00:17 -07:00
Kevin Sawicki 7b07d7116b Store string in local storage 2014-07-25 16:06:35 -07:00
Kevin Sawicki f175086865 Always return boolean from Package::isCompatible 2014-07-25 15:56:09 -07:00
Kevin Sawicki c6071a9802 Don't throw incompatible error, log instead 2014-07-25 15:49:34 -07:00
Kevin Sawicki ac138c1dc8 Throw error when activating incompatible package 2014-07-25 15:46:35 -07:00
Kevin Sawicki 85b7261d31 Don't store incompatible packages in custom object
The info is on the Package object itself to the loaded/activated
packages can just be iterated over.
2014-07-25 15:36:09 -07:00
Kevin Sawicki d47348e8f9 Cache incompatible modules in local storage 2014-07-25 15:34:03 -07:00
Kevin Sawicki 56df7bdbe3 Add version to package 2014-07-25 15:23:36 -07:00
Kevin Sawicki 1ea909d4db Check installed packages for working native modules
Test require each native module in each installed package to make sure
it can be required successfully in Atom.
2014-07-25 15:19:16 -07:00
Ben Ogle c748fc49bb Fix split-selection-into-lines
Don’t create cursor on last row when selection on row is empty


Fixes #1704
Closes #3080
2014-07-25 11:29:40 -07:00
Ivan Žužak 3bd1ec08e1 Upgrade to settings-view@0.136.0 2014-07-25 18:19:54 +02:00
Kevin Sawicki caa6f9b06e Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-25 09:19:44 -07:00
Kevin Sawicki 32045a3f22 Prepare 0.120 2014-07-25 09:17:23 -07:00
Kevin Sawicki 736952d0a2 Upgrade to language-c@0.26 2014-07-25 08:38:35 -07:00
Cheng Zhao 684f15ab89 Don't start crash reporter on Windows.
It is causing crashes on Windows, before it is fixed in atom-shell we
temporarily disable the crash reporter.
2014-07-25 23:28:29 +08:00
Cheng Zhao 4238e031da Upgrade to atom-shell@0.14.2 2014-07-25 23:27:03 +08:00
Kevin Sawicki a457d8a849 Upgrade to symbols-view@0.61 2014-07-24 20:10:16 -07:00
Kevin Sawicki 0b3c0fc622 Upgrade to release-notes@0.36 2014-07-24 18:31:09 -07:00
Nathan Sobo a3d82e9414 Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 18:14:11 -07:00
Nathan Sobo 37165f3293 Invoke pollDOM after attach so character width is calculated
Now that we mount the react component in the constructor of the wrapper
view, it's never actually visible at the time of mount. By invoking
pollDOM manually after attaching and before emitting the attach event,
the character width is available for the wrap guide to calculate its
initial position.
2014-07-24 18:12:02 -07:00
Kevin Sawicki f2507fc9d4 Upgrade to bracket-matcher@0.50 2014-07-24 17:46:05 -07:00
Nathan Sobo 7515fd94ba Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 17:40:37 -07:00
Nathan Sobo 8cc1029bbf Merge pull request #3077 from atom/ns-fix-scroll-perf-regression
Fix performance regression caused by transparent backgrounds on lines and gutter
2014-07-24 17:37:54 -07:00
Nathan Sobo 85363f8eaa Resample background colors whenever stylesheets change
This prevents a flicker that occurred on theme changes when we just
detected this via polling. I'm going to leave the polling as a catch-all
in case the editor is styled inline in some way.
2014-07-24 17:25:04 -07:00
Kevin Sawicki c5b3f18783 Upgrade to bracket-matcher@0.49 2014-07-24 17:24:41 -07:00
Nathan Sobo 7738eeeacc Give the line-numbers div an opaque background for better GPU perf
We sample both the background color of the editor and the gutter. If the
gutter has an actual background color, we use it. Otherwise we fall back
to the same background as the editor.
2014-07-24 17:23:04 -07:00
Nathan Sobo c6116468e4 Apply background color of root editor node to lines as an inline style
This ensures lines have an opaque background that matches whatever the
editor is styled as, but avoids the need to apply the .editor-colors
class to the .lines div. That approach fell down when people were
setting the background color via means other than .editor-colors, such
as styling mini editors via the .editor.mini selector in the settings
view.
2014-07-24 16:54:01 -07:00
Nathan Sobo 2a2d0b60f7 💄 2014-07-24 16:41:25 -07:00
Kevin Sawicki 9a5fddbcbb Upgrade to timecop@0.22 2014-07-24 16:35:32 -07:00
Kevin Sawicki 25c737de56 Upgrade to settings-view@0.135 2014-07-24 16:27:15 -07:00
Kevin Sawicki 8ad8be2583 Merge branch 'master' into chrome35 2014-07-24 14:53:24 -07:00
Nathan Sobo f29f8e37d1 Merge pull request #3071 from atom/ns-react-select-list-editor
Use React for select list mini editors when config option is toggled
2014-07-24 14:36:38 -07:00
Kevin Sawicki b922f01257 Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 14:17:17 -07:00
Nathan Sobo c1ec87c41b Don't apply special styles React mini editors 2014-07-24 12:57:12 -07:00
Nathan Sobo c8aea97f16 Use ReactEditorView in SelectListView when flag is enabled 2014-07-24 12:57:12 -07:00
Nathan Sobo c9587a8638 Mount EditorComponent as soon as ReactEditorView is constructed
...instead of waiting for it to be attached. This makes it simpler to
get shim references when using ReactEditorView for mini editors.
2014-07-24 12:57:12 -07:00
Kevin Sawicki 15fc7a8bc5 Upgrade to tabs@0.47 2014-07-24 12:23:25 -07:00
Kevin Sawicki 76eb3b4c72 Prepare 0.119 2014-07-24 12:16:28 -07:00
Kevin Sawicki c03d34f535 Upgrade to language-c@0.25 2014-07-24 11:21:32 -07:00
Kevin Sawicki 7cfdcf0c1b 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.
2014-07-24 10:40:37 -07:00
Nathan Sobo d3a46b6bc9 Don't try to update lines/line numbers until after initial measurement
Fixes #3047
2014-07-24 10:27:38 -07:00
Kevin Sawicki cc27f2dbb6 Remove spaces around = 2014-07-24 09:35:44 -07:00
Kevin Sawicki 54ce852be4 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
2014-07-24 09:27:47 -07:00
Cheng Zhao 83ad1fe8af Upgrade to atom-shell@0.14.1 2014-07-24 23:37:00 +08:00
Cheng Zhao dcbf730129 Merge branch 'master' into chrome35
Conflicts:
	apm/package.json
	package.json
2014-07-24 17:17:35 +08:00
Cheng Zhao 39868a2330 Make atom.setSize synchronous. 2014-07-24 16:29:20 +08:00
Kevin Sawicki 5d00ca8bb6 Check platform not env 2014-07-23 20:03:02 -07:00
Eric Huss 772726ca96 Fix source maps for CoffeeScript on Windows.
The sourceURL needs to be a URL, not a file path.
2014-07-23 16:49:53 -07:00
Ben Ogle 00275d95ec Merge pull request #3044 from atom/bo-h-scrollbar
Horizontal scrollbar no longer covers the gutter
2014-07-23 16:35:02 -07:00
Ben Ogle 242df788e6 Remove unnecessary scrollbar specs 2014-07-23 16:25:24 -07:00
Ben Ogle 3295b9b0dd Romove runSetImmediateCallbacks() in many cases
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.
2014-07-23 16:25:10 -07:00
Ben Ogle 2a9c78ef92 Move horiz scrollbar into the scrollView
Also remove all the gutter width calculation. It was flawed anyway,
2014-07-23 16:20:48 -07:00
Kevin Sawicki a896d71948 Upgrade to language-c@0.24 2014-07-23 15:37:24 -07:00
Kevin Sawicki e3e0df7728 Upgrade to language-javascript@0.37 2014-07-23 15:34:50 -07:00
probablycorey 0acd3ebd4b Use Tab instead of Buffer in menu items.
Closes #1645
2014-07-23 13:55:29 -07:00
Kevin Sawicki 82f0a68419 Upgrade to snippets@0.49 2014-07-23 13:03:14 -07:00
Kevin Sawicki 9a95c3acef Upgrade to language-go@0.15 2014-07-23 12:31:28 -07:00
Kevin Sawicki 22eb16352c Add more config file items to File menu 2014-07-23 11:30:00 -07:00
Kevin Sawicki 5355310cc7 Upgrade to apm 0.83 2014-07-23 10:59:26 -07:00
Kevin Sawicki 9f9ca0a2cf Don't dedupe node-gyp
npm has hard-coded paths to it so it can't be moved up.
2014-07-23 10:45:21 -07:00
Kevin Sawicki 29970acaa9 📝 Document second argument of callback 2014-07-23 10:29:46 -07:00
Kevin Sawicki 8c0b9017c2 Merge pull request #2982 from atom/ks-file-diet
Remove unneeded files from distribution
2014-07-23 10:27:29 -07:00
Kevin Sawicki e9890810d3 Don't include more dot files 2014-07-23 10:11:03 -07:00
Kevin Sawicki 0e201d539a Sort by name when type count is the same 2014-07-23 10:11:03 -07:00
Kevin Sawicki 6a0e7cfb24 Add task to output file types in build folder 2014-07-23 10:11:03 -07:00
Kevin Sawicki e13defc0f7 Don't include broken symlinks 2014-07-23 10:11:03 -07:00
Kevin Sawicki 3326cf357f Dedupe semver in apm 2014-07-23 10:11:03 -07:00
Kevin Sawicki 9c78b9832b Dedupe node-gyp in apm 2014-07-23 10:11:02 -07:00
Kevin Sawicki 662b8b30a1 Don't include pegjs when grammars are precompiled 2014-07-23 10:11:02 -07:00
Kevin Sawicki caa15e42ac Don't include npm docs 2014-07-23 10:11:02 -07:00
Kevin Sawicki 75410e07da Don't include .node.dSYM folders 2014-07-23 10:11:02 -07:00
Kevin Sawicki 72727c2a81 Don't include generated Makefiles 2014-07-23 10:11:02 -07:00
Kevin Sawicki adaee84933 Remove unused fixtures 2014-07-23 10:11:02 -07:00
Kevin Sawicki d761684212 Don't include nan 2014-07-23 10:11:02 -07:00
Kevin Sawicki 307d4984a2 Don't include binding.gyp files 2014-07-23 10:11:02 -07:00
Kevin Sawicki 09711d5a88 Don't include target.mk or linker.lock files 2014-07-23 10:11:02 -07:00
Kevin Sawicki 2e1239345e Don't include bootstrap site files 2014-07-23 10:11:02 -07:00
Kevin Sawicki 8d6325b081 Don't include benchmark folders 2014-07-23 10:11:02 -07:00
Kevin Sawicki 8a8144defa Upgrade to dev-live-reload@0.32 2014-07-23 10:11:01 -07:00
Kevin Sawicki ed867666ed Specify regex directly as filter 2014-07-23 10:11:01 -07:00
Kevin Sawicki 84ff28ee69 Remove unused package fixtures 2014-07-23 10:11:01 -07:00
Kevin Sawicki 97f032c66f Make e optional in test regex 2014-07-23 10:11:01 -07:00
Kevin Sawicki 18ea3bcb99 Don't include atom-shell's default_app folder 2014-07-23 10:11:01 -07:00
Kevin Sawicki 8da4ed147b Don't include .travis.yml and .npmignore files 2014-07-23 10:11:01 -07:00
Kevin Sawicki edd1f46ad2 Don't include more build files 2014-07-23 10:11:01 -07:00
Kevin Sawicki cfb1501720 Remove unused replication fixture 2014-07-23 10:11:01 -07:00
Kevin Sawicki 17ceb34140 Don't include jasmine-node/spec files 2014-07-23 10:11:01 -07:00
Kevin Sawicki c551b58490 Update comment with .h files 2014-07-23 10:11:01 -07:00
Kevin Sawicki 6c736ace1a Don't include .h files from native modules 2014-07-23 10:11:01 -07:00
Kevin Sawicki 4ff2429f71 Don't include .cc files from native modules 2014-07-23 10:11:00 -07:00
Kevin Sawicki 01499fe674 Uncomment grunt.task.run call 2014-07-23 10:11:00 -07:00
Kevin Sawicki c4d26f6405 Filter example files from built app 2014-07-23 10:11:00 -07:00
Kevin Sawicki bd93f243dc 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
2014-07-23 10:11:00 -07:00
Kevin Sawicki 1663315323 Merge pull request #3049 from dsandstrom/add-linux-select-line-key
Add key binding for select-line to linux and win keymaps
2014-07-23 10:08:01 -07:00
Ben Ogle ffb041a160 Only render an nbsp on empty lines when no eol character defined
Fixes #3053
2014-07-23 09:30:52 -07:00
Kevin Sawicki f5f9de1bf8 Upgrade to tabs@0.46 2014-07-23 08:26:28 -07:00
Darrell Sandstrom 2f47e8a462 Add key binding for select-line to linux and win keymaps 2014-07-22 22:48:27 -07:00
Kevin Sawicki 119b446c3b Upgrade to language-c@0.23 2014-07-22 20:31:21 -07:00
Kevin Sawicki c2042ad74a Upgrade to apm 0.82 2014-07-22 18:40:50 -07:00
Ben Ogle 361f8ec770 Add specs for toggling the gutter when the editor is hidden 2014-07-22 18:26:58 -07:00
Ben Ogle 48a5123202 💄 Move logic into measureGutterIfNeeded 2014-07-22 18:26:58 -07:00
Ben Ogle 0f1d155685 Move gutterWidth into state; add specs for scrollbar position 2014-07-22 18:26:58 -07:00
Ben Ogle d3a6e79428 The horizontal scrollbar takes gutter width into account 2014-07-22 18:26:58 -07:00
Kevin Sawicki 5f7f5b5367 Merge branch 'master' into chrome35 2014-07-22 17:56:24 -07:00
Kevin Sawicki 2fe647c950 Store atom-shell cache in ~/.atom/atom-shell
There were several CI failures today where it seemed like the
atom-shell version in the temp directory wasn't complete, it was
missing many files causing the build to fail when the specs were
run.

What made this worse was that running script/clean on these machines
didn't clean out these bad versions since the temp directory was different
when run via Jenkins vs. ssh'ing into the machines so the folders were
left there and the builds kept failing.

Atom already stores the compile cache to ~/.atom as well as the node cache
so putting atom-shell there as well keeps things consistent.
2014-07-22 17:44:41 -07:00
Kevin Sawicki 683f8e06f8 Upgrade to underscore-plus@1.5.1 2014-07-22 15:57:49 -07:00
Kevin Sawicki bc4173f856 Remove logging of screen lines in spec 2014-07-22 14:51:13 -07:00
Kevin Sawicki 8443f0e2b9 Merge pull request #3042 from kubekhrm/patch-1
Added Ctrl-Shift-Z for Linux Redo.
2014-07-22 14:46:09 -07:00
Kube Khrm b9e2c47321 Added Ctrl-Shift-Z for Linux Redo. 2014-07-22 23:41:51 +02:00
Kevin Sawicki 8099c46c8e Use OnigRegExp::testSync 2014-07-22 14:38:08 -07:00
probablycorey a3f046b948 Fix getVersion spec 2014-07-22 14:10:29 -07:00
probablycorey 911ca0d846 Remove Atom.isReleasedVersion 2014-07-22 14:10:29 -07:00
probablycorey 88d1ba2271 Remove Atom.getVersion() 2014-07-22 14:10:29 -07:00
Kevin Sawicki bbfd9b8178 Use testSync instead of test 2014-07-22 14:08:40 -07:00
Kevin Sawicki 3818dee175 Prepare 0.118 2014-07-22 13:48:53 -07:00
Kevin Sawicki 6d34de68ac Add Sync suffix to oniguruma methods 2014-07-22 13:31:52 -07:00
Kevin Sawicki 10fb929a1b Upgrade to first-mate@2.0.1 2014-07-22 13:24:39 -07:00
Ben Ogle d1a610dcb6 Merge pull request #2919 from atom/bo-the-wiggle
Fix width too wide when softwrap enabled when editor can vertical scroll
2014-07-22 12:42:49 -07:00
Ben Ogle 17364cd528 Take the scrollbar width into account in specs 2014-07-22 11:54:26 -07:00
Ben Ogle c67f8493e0 Softwrap always takes into account the vertical scrollbar width 2014-07-22 11:52:23 -07:00
Ben Ogle 1a90588752 Visible is now a member variable. 2014-07-22 11:46:34 -07:00
Kevin Sawicki 4f4b840f67 Upgrade to language-go@0.14 2014-07-22 11:37:38 -07:00
Kevin Sawicki 77158738e6 Merge pull request #3038 from atom/ks-add-tomorrow-light-theme
Ship with tomorrow light theme
2014-07-22 11:19:48 -07:00
Kevin Sawicki 27d0743edc Upgrade to base16-tomorrow-light-theme@0.3 2014-07-22 11:10:34 -07:00
Kevin Sawicki 9aca6a4489 Upgrade to base16-tomorrow-dark-theme@0.20 2014-07-22 11:10:26 -07:00
Kevin Sawicki 866fd69008 Add tomorrow light theme to cache 2014-07-22 11:00:36 -07:00
Kevin Sawicki d9a942d6c6 Bundle base16-tomorrow-light-theme 2014-07-22 11:00:36 -07:00
Kevin Sawicki 6f0920c04b Prepare 0.117 2014-07-22 10:59:23 -07:00
Ben Ogle 2e4893c786 Be more defensive in ReactEditorView::activate
It is conceivable that a package could have a reference to a view
that is not within a pane. 

Fixes #2853
2014-07-22 10:37:37 -07:00
Nathan Sobo 5871bee791 Make spec assertions insensitive to scrollbars on Windows 2014-07-22 10:16:43 -07:00
Kevin Sawicki adea792b78 Use tmpDir variable 2014-07-22 09:24:06 -07:00
Ben Ogle 36f1ebfb6f Merge pull request #2423 from atom/cj-make-react-the-default-editor
Make react the default editor
2014-07-22 08:59:26 -07:00
Kevin Sawicki a45e38cd8a Merge pull request #2779 from atom/document-atom-io-pagination
Document pagination for atom.io/api/packages
2014-07-22 08:44:48 -07:00
Kevin Sawicki 46b95318a1 Wrap header name in backticks 2014-07-22 08:43:43 -07:00
Daniel Hengeveld 50086df804 document pagination for atom.io/api/packages 2014-07-22 08:43:10 -07:00
Cheng Zhao 52e049bedc Merge branch 'master' into chrome35
Conflicts:
	apm/package.json
	package.json
2014-07-22 10:13:40 +08:00
Cheng Zhao a6640f6da7 Upgrade to atom-shell@0.14.0 2014-07-22 09:58:53 +08:00
Ben Ogle 2f82fb2ceb Upgrade find-and-replace to fold results 2014-07-21 18:02:02 -07:00
Kevin Sawicki c50c25b2d4 Merge pull request #3031 from atom/ks-copy-desktop-file-during-install
Don't write .deb files in place
2014-07-21 17:19:10 -07:00
Kevin Sawicki 89733300a5 💄 2014-07-21 17:00:53 -07:00
Kevin Sawicki b9658e23f4 Write file using grunt API 2014-07-21 16:53:27 -07:00
Kevin Sawicki 1757ff18f2 Write control/desktop files to build dir 2014-07-21 16:52:20 -07:00
Kevin Sawicki a26cb6023e Track temp folders 2014-07-21 16:47:08 -07:00
Kevin Sawicki ccd631a934 Write control/desktop files to temp folder 2014-07-21 16:45:59 -07:00
Kevin Sawicki ab980d78d2 💄 2014-07-21 16:39:46 -07:00
Kevin Sawicki f5951425c3 grunt.file.write creates parent dirs 2014-07-21 16:39:23 -07:00
Kevin Sawicki 74992b1397 Group template variables together 2014-07-21 16:38:49 -07:00
Kevin Sawicki 4b07b803b3 Move install file var under if block 2014-07-21 16:37:42 -07:00
probablycorey 94f871e37e Make react editor the default 2014-07-21 16:33:25 -07:00
Kevin Sawicki 4a8a741ef0 Write Atom.desktop file directly from template
Previously this was written to resources/linux/Atom.desktop
which would create issues when running `sudo script/grunt install`
followed by `script/grunt mkdeb`
2014-07-21 16:30:27 -07:00
Kevin Sawicki 162d5a0e0d Map ctrl-shift-z to core:redo on Windows
Closes #2988
2014-07-21 16:09:56 -07:00
Kevin Sawicki a22cf44b49 Upgrade to git-utils 1.6
Closes atom/tree-view#53
2014-07-21 16:07:49 -07:00
Kevin Sawicki 10bad42e7a Upgrade to language-less@0.13 2014-07-21 15:28:55 -07:00
Kevin Sawicki 8a6753905c Upgrade to language-sass@0.14 2014-07-21 15:28:13 -07:00
Kevin Sawicki 73354f56f4 Upgrade to language-yaml@0.13 2014-07-21 15:28:01 -07:00
Nathan Sobo 43c9e21f1d Make setEditorHeightInLines/WidthInChars spec helpers work with React
Fixes #3019
2014-07-21 15:04:44 -07:00
Nathan Sobo ba21f0b0d8 Eliminate duplicate 'gutter' class
This was previously needed when we applied 'editor-colors' to the
line numbers to give them an opaque background in hopes of supporting
sub pixel AA, but that dream is dead for now anyway. This makes the
gutter harder to style, so I'm nixing it.
2014-07-21 14:56:09 -07:00
Nathan Sobo 0ee953fe26 Merge pull request #2955 from atom/ns-react-mini-editors
Allow React editors to be used as mini-editors with core.useReactMiniEditors option
2014-07-21 14:44:17 -07:00
Nathan Sobo a68b9a793f Don't update the GutterComponent if there's no renderedRowRange 2014-07-21 14:28:48 -07:00
Nathan Sobo fb4361e976 Guard React mini-editors with core.useReactMiniEditors feature flag
I'm not adding a default for this one so it won't show up in the
settings view unless the user sets it in their config explicitly. I'm
hoping it won't need to be flagged for very long.
2014-07-21 14:13:05 -07:00
Kevin Sawicki f9d866fa32 Upgrade to tree-view@0.111 2014-07-21 14:12:00 -07:00
Nathan Sobo 0c4da92d6b Handle hide and show entirely in the wrapper view
Enable sync updates and manually invoke the pollDOM function on the
component when we call hide/show on the wrapper view. This ensures that
we perform initial measurements when showing the editor for the first
time.
2014-07-21 14:09:16 -07:00
Kevin Sawicki 6377c7ebf4 Upgrade to fs-plus 2.2.4
Closes #2313
2014-07-21 13:54:17 -07:00
Kevin Sawicki 08ecba72e6 Upgrade to pathwatcher 1.5
Closes atom/tree-view#194
2014-07-21 13:53:58 -07:00
Nathan Sobo 38b286f989 Remove 'editor-colors' class from lines and gutter for mini editors
Having the editor-colors class on these elements was causing the theme
to be applied to lines in mini editors in the settings view, which
caused a black inset box to appear with dark syntax themes.

This was added to give the lines an opaque background which was supposed
to enable sub pixel anti-aliasing despite being on the GPU, but it
didn't seem to be working. Perhaps we can revisit this issue after the
Chrome 35 upgrade to see if sub pixel antialiasing works with opaque
backgrounds afterward.
2014-07-21 13:50:58 -07:00
Nathan Sobo df7f816c88 Move 'editor-colors' to wrapper view to support padding on mini editors 2014-07-21 13:43:00 -07:00
Nathan Sobo ca1220a682 Delay initial measurement until the editor becomes visible
Previously, these measurements were always performed when the editor
component was mounted. This didn't work in situations where the
component was mounted in a non-visible state. This commit includes a
visibility check in the resize polling we were already doing, kicking
off the measurement process as soon as the editor is visible.
2014-07-21 13:40:10 -07:00
Ben Ogle 9bb6c3cc3d Merge pull request #3022 from batjko/patch-1
Update Windows build instructions
2014-07-21 10:58:54 -07:00
Nathan Sobo 4a8ac85ffb Restrict ReactEditorView::getPane implementation 2014-07-21 10:43:32 -07:00
Nathan Sobo c4177aba3e Handle 'attributes' param to ReactEditorView 2014-07-21 10:43:31 -07:00
Nathan Sobo 3206fdce9e Add ReactEditorView::setPlaceholderText shim 2014-07-21 10:43:31 -07:00
Nathan Sobo 0346e5809a Only prevent default on mousewheel events if editor actually scrolls
This prevents mini editors from capturing scroll events.
2014-07-21 10:43:31 -07:00
Nathan Sobo 99704517bb Remove animation frame batching of mousewheel events
This doesn't seem to adversely affect the scroll experience, and it's
much simpler. I want to avoid preventing the default action of
mousewheel events if they don't actually lead to scrolling, and making
the behavior synchronous will make that a lot easier.
2014-07-21 10:43:31 -07:00
Nathan Sobo 783ef730e2 Rename EditorComponent::measureScrollView to ::measureHeightAndWidth
Since we also check if we're auto-height in this method, this name seems
like a better description of the objectives of this method.
2014-07-21 10:43:31 -07:00
Nathan Sobo e81db5d706 Pull out EditorComponent::pollDOM method
This makes the actions that we perform in the poll loop explicit, and
will prevent the accumulation of polling-related behavior in the
::measureScrollView method.
2014-07-21 10:43:31 -07:00
Nathan Sobo a0f75f1639 Determine visibility by checking offsetWidth/Height of the editor's node
This could still use some cleanup
2014-07-21 10:43:31 -07:00
Nathan Sobo d0893ccdaf Add placeholderText to React editors 2014-07-21 10:43:31 -07:00
Nathan Sobo a9c7842a50 Don't render line decorations on mini editors 2014-07-21 10:43:31 -07:00
Nathan Sobo 544c759fd1 Don't set an explicit line height on mini editors
This allows the line height to be styled via CSS. I would actually
like to allow all these properties to be assigned via CSS rather than
explicitly via the settings view, but that can be deferred until the
old editor is removed.
2014-07-21 10:43:31 -07:00
Nathan Sobo 759dbc061d Don't render invisible characters in React mini editors 2014-07-21 10:43:31 -07:00
Nathan Sobo 56c9f75e8c Add the 'mini' class to the React wrapper view for mini editors 2014-07-21 10:43:30 -07:00
Nathan Sobo 635f288050 Explicitly assign height of editor-contents when height is auto 2014-07-21 10:43:30 -07:00
Nathan Sobo cc8b7b13b3 Don't show the gutter when 'mini' is true on React editors 2014-07-21 10:43:30 -07:00
Nathan Sobo 4020ed1535 Support ReactEditorView construction with params hash 2014-07-21 10:43:30 -07:00
Nathan Sobo e999ef00e7 Base editor dimensions on the wrapper view
The goal is to make the editor behave like a standard block-level
element.

The horizontal behavior is simple: we stretch horizontally to fill our
container.

The vertical behavior is more nuanced. If an explicit height is assigned
on the wrapper view, we honor that height. But if no explicit height is
assigned, the editor stretches vertically so that its contents are
visible.

This prepares us to support mini editors, which need to be 1-line tall
without an explicit height assignment.
2014-07-21 10:43:30 -07:00
Nathan Sobo f16ea63a95 Export ReactEditorView as EditorView from 'atom' module
Also, remove a few early requires of 'exports/atom.coffee' in the spec
suite that were causing failures.
2014-07-21 10:43:30 -07:00
Kevin Sawicki 754f995c91 Upgrade to language-yaml@0.12 2014-07-21 10:34:10 -07:00
Kevin Sawicki ac8a67822e Upgrade to apm 0.81 2014-07-21 10:14:58 -07:00
Kevin Sawicki 1c7926dea6 Merge pull request #2994 from jordanbtucker/patch-1
support ctrl-shift-home/end on Windows
2014-07-21 09:13:58 -07:00
Kevin Sawicki 2bd8015a9d Merge pull request #3021 from dmnd/patch-1
Fix typo in event trigger
2014-07-21 08:51:49 -07:00
batjko 09e8aa0571 typo 2014-07-21 09:38:00 +01:00
batjko 364e06483c corrected grammar 2014-07-21 09:37:16 +01:00
batjko 2d07d6662c Update Windows build instructions
Just a few suggested changes to reflect experiences over a few months of building on several Windows machines.
- The Posix tools comment doesn't seem to be applicable (anymore)? 
- Added further instructions when using pre-installed Git.
- Added the frequent issue of first-time build failures (random `node-gyp` errors), which don't reoccur on second try.
- Added a few extra words on opening a new issue, to clarify that appropriate details should be provided, if the issue hasn't been reported before.

Feel free to amend or suggest further changes.
2014-07-21 09:33:17 +01:00
Desmond Brand 3d53749771 Fix typo in event trigger
destoryed -> destroyed
2014-07-21 00:20:39 -07:00
Cheng Zhao eeadd823e6 Upgrade to atom-keymap@1.0.0 2014-07-21 09:40:13 +08:00
Cheng Zhao 8a5bd357cd Upgrade to text-buffer@3.0.0 2014-07-21 09:39:48 +08:00
Nathan Sobo 79ee887c9a Fix a bug where scopes were being duplicated for every single token
This improves scroll performance by generating many fewer span elements
to render lines.
2014-07-20 15:09:14 -07:00
Ben Ogle 37d0a7f7e5 Merge pull request #2992 from maschs/ms-buildArch
Add build instructions for Arch
2014-07-20 11:01:02 -07:00
Ben Ogle ed4324dedc Merge pull request #3014 from Frozenfire92/patch-1
Improve Linux install instructions
2014-07-20 11:00:13 -07:00
Joel Kuntz d2da914151 Fix abbreviation 2014-07-19 14:20:32 -03:00
Joel Kuntz ca39e7f7de Fix typo 2014-07-19 13:08:24 -03:00
Joel Kuntz 7bf2b7237e Update linux.md
Improve installation instructions
2014-07-19 13:06:36 -03:00
Maximilian Schüßler c264855f87 Cleanup linux build instructions 2014-07-19 15:33:11 +02:00
Maximilian Schüßler a5f2a44a45 Arch requires export PYTHON=/usr/bin/python2 to build 2014-07-19 14:50:02 +02:00
Ben Ogle 4960a63bd8 Upgrade solarized dark for better C and py styles 2014-07-18 17:14:10 -07:00
Cheng Zhao 42621805a7 Upgrade to link@1.0.0 2014-07-18 23:10:56 +08:00
Cheng Zhao fed55b8896 Upgrade to bracket-matcher@1.0.0 2014-07-18 22:50:31 +08:00
Cheng Zhao 73daa4bb74 Upgrade to scrollbar-style@1.0.0 2014-07-18 22:24:03 +08:00
Cheng Zhao 92546c60b3 Upgrade to scandal@1.0.0 2014-07-18 22:18:11 +08:00
Cheng Zhao 2fa91e5dfb Upgrade to frist-mate@2.0.0 2014-07-18 22:06:12 +08:00
Cheng Zhao aac0913b8b Upgrade to tree-view@1.0.0 2014-07-18 21:50:06 +08:00
Cheng Zhao acc75ca859 Upgrade to symbols-view@1.0.0 2014-07-18 21:40:52 +08:00
Cheng Zhao 8eb4e13df8 Upgrade to spell-check@1.0.0 2014-07-18 21:07:47 +08:00
Cheng Zhao 087d9c1da6 Upgrade to snippets@1.0.0 2014-07-18 14:54:03 +08:00
Cheng Zhao 18336076a8 Upgrade to markdown-preview@1.0.0 2014-07-18 14:46:46 +08:00
Cheng Zhao 7fee5f5f25 Upgrade to dev-live-reload@1.0.0 2014-07-18 14:37:16 +08:00
Cheng Zhao c2f04a00d2 Upgrade to archive-view@1.0.0 2014-07-18 14:28:09 +08:00
Cheng Zhao cc927123f9 Upgrade to nslog@1.0.0 2014-07-18 11:28:03 +08:00
Cheng Zhao 97b426429b Upgrade to oniguruma@3.0.0 2014-07-18 10:16:17 +08:00
Cheng Zhao 3686530943 Upgrade to pathwatcher@2.0.2 2014-07-18 10:15:35 +08:00
Cheng Zhao 621ef450da Upgrade to runas@1.0.0 2014-07-18 10:14:56 +08:00
Cheng Zhao 1e08bcd634 Upgrade to git-utils@2.0 2014-07-18 10:14:14 +08:00
Cheng Zhao ede468d4c9 Upgrade to apm 1.0.0 2014-07-18 10:09:45 +08:00
Kevin Sawicki 1278f88dd9 Upgrade to language-gfm@0.43 2014-07-17 19:00:21 -07:00
Nathan Sobo 6faf3bd827 Merge pull request #3006 from atom/ns-abort-key-binding
Upgrade keymap to support 'abort!' directive in keybindings
2014-07-17 18:16:59 -07:00
Nathan Sobo 92a2b52f53 Upgrade keymap to support 'abort!' directive in keybindings
Closes atom/vim-mode#348
2014-07-17 18:03:51 -07:00
Kevin Sawicki 8135458670 Upgrade to whitespace@0.25 2014-07-16 21:16:47 -07:00
Kevin Sawicki 160a1cd690 Upgrade to language-ruby@0.33 2014-07-16 21:12:59 -07:00
Kevin Sawicki 2d3a133790 Upgrade to git-diff@0.37 2014-07-16 21:06:31 -07:00
jordanbtucker af5384cd51 support ctrl-shift-home/end on Windows
fixes issue #2989
2014-07-16 11:30:47 -07:00
Maximilian Schüßler 27423fcc15 Add Arch build instructions 2014-07-16 18:14:30 +02:00
Nathan Sobo cdb5fe15d2 Render nbsp on empty lines to ensure they have a non-zero height
Fixes #2958
2014-07-16 00:56:14 -07:00
Ivan Žužak 608c2b5354 Merge pull request #2977 from atom/iz-multiple-separators
Support multiple separators in context menu
2014-07-15 15:22:37 -07:00
Kevin Sawicki 121350f8e5 Upgrade to language-coffee-script@0.27 2014-07-15 11:44:50 -07:00
Kevin Sawicki 7bcc91e7d2 Upgrade to apm 0.80 2014-07-15 11:39:57 -07:00
Kevin Sawicki b192622ad8 Upgrade to language-javascript@0.36 2014-07-15 11:37:09 -07:00
Kevin Sawicki 778e6f4492 Upgrade to apm 0.79.0 2014-07-15 08:50:28 -07:00
Ben Ogle 8614777af4 Merge pull request #2943 from atom/bo-ms-fix-tab-stops
Fix tab stops for soft tabs
2014-07-15 08:45:13 -07:00
Ben Ogle cce49da18c Fix spec 2014-07-15 08:44:58 -07:00
Ben Ogle 66bfefc09d Upgrade snippets to fix specs with tab stops 2014-07-15 08:44:58 -07:00
Ben Ogle 29e883cf36 Add specs 2014-07-15 08:44:21 -07:00
Maximilian Schüßler 381d5b91b2 Indentation respects tab stops now, fix #2672 2014-07-15 08:44:21 -07:00
Ben Ogle b744997201 Merge pull request #2950 from lee-dohm/ld-bug-2274
🐛 Fix regression in indent-guide in React editor
2014-07-15 08:06:02 -07:00
Kevin Sawicki 0357872558 Use repository URL in crashed message
Now that the repository is public, issues there are better than
emailing the help address.
2014-07-15 06:25:53 -07:00
Kevin Sawicki 844186f5fc Upgrade to settings-view@0.134.0 2014-07-14 20:49:53 -07:00
Kevin Sawicki 0a818cfdd7 Map ctrl-, to application:show-settings on Windows
Refs #2962
2014-07-14 20:29:53 -07:00
Ivan Zuzak cd1a17fb0a Support multiple separators in context menu 2014-07-14 17:10:13 -07:00
Kevin Sawicki 9abab27ba7 Merge pull request #2968 from atom/ks-dont-quote-explorer-arguments
Don't quote certain explorer arguments
2014-07-14 08:03:19 -07:00
Kevin Sawicki 0faff626d1 Remove stray # 2014-07-14 07:55:28 -07:00
Kevin Sawicki c355ade477 Upgrade to tree-view@0.110.0 2014-07-14 07:55:28 -07:00
Kevin Sawicki 18818c9ba5 Special case quoting of certain explorer args
This is required for things like:

`explorer.exe /root,C:\a\folder` to spawn correctly.

Refs atom/tree-view#180
2014-07-14 07:55:28 -07:00
Kevin Sawicki b4ca3e46e6 Upgrade to language-coffee-script@0.26 2014-07-14 07:52:40 -07:00
Kevin Sawicki 262ba6be20 📝 Mention downloading .zip Windows release 2014-07-13 17:56:55 -07:00
Kevin Sawicki 50c5d12ced Upgrade to archive-view@0.34 2014-07-13 16:42:03 -07:00
Kevin Sawicki d6d51155ac Upgrade to symbols-view@0.60 2014-07-13 16:29:39 -07:00
Lee Dohm b100310764 Add failing test for #2274
Tested first on a branch off of `master` to ensure that it would
actually fail 😀
2014-07-13 13:27:32 -07:00
Lee Dohm 7ac3e6d9a5 🐛 Fix regression in indent-guide in React editor
Previously the indent guide was always showing on the whitespace only
lines in the React editor. This is the same behavior as in the old
editor and had the same fix, just ported to `LinesComponent`.

See: 314833bbac

Fixes #2274
2014-07-13 09:39:21 -07:00
Kevin Sawicki 2742995541 Upgrade to language-c@0.22 2014-07-11 16:21:46 -07:00
Ben Ogle b8c0c125a2 Merge pull request #2941 from atom/bo-fallback-vars
Import base *-variables files as fallback vars when loading packages/themes
2014-07-11 15:16:30 -07:00
Kevin Sawicki d78eb3d142 Upgrade to apm 0.78 2014-07-11 15:11:02 -07:00
Ben Ogle 36769c35fc Don’t need the absolute path, just variables
`static` is already on the path
2014-07-11 15:04:00 -07:00
Ben Ogle e6c0c38894 Upgrade to tabs to fix tab size issue 2014-07-11 14:48:56 -07:00
Ben Ogle 1f77450f7e Use less-cache@0.13.0 2014-07-11 14:22:04 -07:00
Ben Ogle c4204eb9e9 import the fallback variables in the base theme 2014-07-11 14:08:29 -07:00
Ben Ogle 9a393a6ec9 Load fallback variables in the user’s stylesheet 2014-07-11 14:08:09 -07:00
Ben Ogle bbe02fc6b0 Load packages with the fallback variables 2014-07-11 14:07:48 -07:00
Ben Ogle 9fbc6d4f02 Add cssForFile to LessCompileCache 2014-07-11 14:06:46 -07:00
Ben Ogle e620121953 Add spec for loading theme with incomplete variable file 2014-07-11 14:04:54 -07:00
Kevin Sawicki 41c8878769 📝 Add missing : 2014-07-11 13:30:30 -07:00
Kevin Sawicki d2834fa651 Prepare 0.116 2014-07-11 13:29:11 -07:00
Kevin Sawicki 4155c53bd6 Upgrade to markdown-preview@0.93 2014-07-11 13:03:44 -07:00
Ben Ogle d3538502c5 Update git-diff to fix atom/git-diff#31 2014-07-11 12:35:52 -07:00
Kevin Sawicki 90a17de8bd Upgrade to markdown-preview@0.92 2014-07-11 11:56:44 -07:00
Kevin Sawicki a82ea86a05 Upgrade to markdown-preview@0.91 2014-07-11 11:05:03 -07:00
Ben Ogle 22c4992788 Merge pull request #2760 from atom/package-api-stability-notice
Add stability message for Atom.io API
2014-07-11 10:58:57 -07:00
Ben Ogle 2a5d034248 Merge pull request #2920 from atom/bo-gutter-toggle-api
Move gutter member into a showLineNumbers observe block
2014-07-11 10:54:24 -07:00
Kevin Sawicki ed3c37c101 Upgrade to tree-view@0.109.0 2014-07-11 10:42:27 -07:00
Kevin Sawicki 558e5e52c5 Prepare 0.115 2014-07-11 09:57:20 -07:00
Kevin Sawicki 92d16a9d0a Upgrade to apm@0.77 2014-07-11 09:23:31 -07:00
Ivan Žužak f224a6d5f0 Upgrade to fuzzy-finder@0.57.0 2014-07-11 18:14:56 +02:00
probablycorey 16f95a1420 Upgrade to metrics@v0.33.0 2014-07-11 09:02:53 -07:00
Kevin Sawicki 0231d02877 Upgrade to language-javascript@0.35 2014-07-11 08:47:10 -07:00
Kevin Sawicki 6d2b70b3d9 Check that args are present before mapping over
Closes #2925
2014-07-11 08:40:53 -07:00
Ben Ogle 49b825aeb3 Merge pull request #2927 from batjko/master
Change shift-delete to trigger core:cut in Win32 and Linux
2014-07-11 08:01:29 -07:00
Patrick Metzdorf 357299a700 Change shift-delete to trigger core:cut
Win32 and Linux keymaps
2014-07-11 10:14:56 +01:00
Ben Ogle 88df674dd6 Move gutter member into a showLineNumbers observe block 2014-07-10 18:04:53 -07:00
Kevin Sawicki 31afa0abd5 Merge pull request #2915 from atom/ks-32-bit-node-on-windows
Ship 32-bit node with apm on Windows
2014-07-10 17:40:50 -07:00
Kevin Sawicki b11accec6d 📝 Doc --arch=ia32 flag 2014-07-10 17:28:21 -07:00
Kevin Sawicki defa869d5c Upgrade to apm@0.76 2014-07-10 17:28:21 -07:00
Kevin Sawicki 8d4be6ab57 Install apm in 32-bit mode on Windows CI 2014-07-10 17:28:21 -07:00
Ben Ogle 9976166902 Render the line numbers after gutter mount
Fixes #2916
2014-07-10 17:25:58 -07:00
Kevin Sawicki 8ea277ef77 Upgrade to language-javascript@0.34 2014-07-10 17:22:13 -07:00
Kevin Sawicki d85b8bfaf3 Merge pull request #2889 from atom/ks-windows-dimensions-on-windows
Validate window dimensions
2014-07-10 14:30:01 -07:00
Daniel Hengeveld d9e15d937e Merge pull request #2895 from atom/dh-atom-io-package-rename-doc
Change some heading levels and add docs for package renames
2014-07-10 14:26:21 -07:00
Kevin Sawicki 908ff5d3cd 💄 Add space before -> 2014-07-10 14:21:02 -07:00
Kevin Sawicki 35b4ba3066 💄 2014-07-10 14:21:02 -07:00
Kevin Sawicki f90e47daef Handle invalid serialized window dimensions 2014-07-10 14:21:02 -07:00
Kevin Sawicki 5440dd68a7 Use instance method 2014-07-10 14:21:01 -07:00
Kevin Sawicki 11205d9eaa Don't store invalid window dimensions on Windows 2014-07-10 14:21:01 -07:00
Kevin Sawicki 34e37fce7c Upgrade to apm@0.75 2014-07-10 12:02:18 -07:00
Kevin Sawicki 3402c8dcd1 Dedupe request in apm folder
This prevents long path issues on Windows
2014-07-10 11:47:02 -07:00
Kevin Sawicki 3921a63f67 Just use variable in hash 2014-07-10 11:44:55 -07:00
Kevin Sawicki 5ecaf5dfc4 Upgrade to apm@0.74 2014-07-10 11:30:41 -07:00
Ben Ogle 475f92351f == -> is 2014-07-10 10:40:49 -07:00
Kevin Sawicki 0a5b378425 Upgrade to apm 0.73 2014-07-10 10:01:00 -07:00
Kevin Sawicki 157774f552 Map ctrl-f4 to core:close command on Windows
Closes #2903
2014-07-10 09:14:15 -07:00
Kevin Sawicki 320c12134a Upgrade to apm 0.72 2014-07-10 09:02:18 -07:00
Kevin Sawicki 280b451835 Merge pull request #2904 from maschs/ms-fixTypo
Fix typo
2014-07-10 08:25:20 -07:00
Maximilian Schüßler 4ee03fe590 Fix typo 2014-07-10 16:30:45 +02:00
Ben Ogle db1652f1ed Add return statement docs 2014-07-09 18:25:37 -07:00
Ben Ogle 8013ff7775 Update decoration API docs 2014-07-09 18:16:20 -07:00
Daniel Hengeveld c24475c2c8 Add error type to package version doc 2014-07-09 17:45:10 -07:00
Daniel Hengeveld 580c639265 Change some heading levels and add rename doc 2014-07-09 17:41:19 -07:00
Ben Ogle 4c33549371 Merge pull request #2888 from atom/bo-speedup-decoration-render
Index line-wise decorations by ids
2014-07-09 14:11:55 -07:00
Ben Ogle 7be5553ba1 Index line decorations by ids
And don’t use _.deepContains
2014-07-09 12:51:52 -07:00
Kevin Sawicki 43936a1faf Upgrade to find-and-replace@0.126 2014-07-09 12:24:34 -07:00
Kevin Sawicki e3c44bf551 📝 Add Windows installation instructions 2014-07-09 11:14:21 -07:00
Kevin Sawicki 6b0636d331 Upgrade to whitespace@0.24 2014-07-09 11:06:35 -07:00
Ben Ogle cb0ee735be Default cursor on scrollbars.
Fixes #2876
2014-07-09 08:46:48 -07:00
Kevin Sawicki 036dc06bac Upgrade to language-coffee-script@0.25 2014-07-09 08:23:14 -07:00
Nathan Sobo 7155ec4b73 Fix autoscroll specs for addSelectionForBufferRange 2014-07-09 08:06:14 -06:00
Nathan Sobo 86ea4d94bb Only autoscroll in model when adding selection in React editors
Fixes atom/find-and-replace#245
2014-07-09 07:46:44 -06:00
Nathan Sobo 6a2021ac98 Emit editor:will-be-removed event when unmounting the React editor 2014-07-08 21:29:53 -06:00
Nathan Sobo 6fe05064eb Use default implementation of ::destroy from theorist Model class
Move actions that need to happen on destruction to ::destroyed hook.
2014-07-08 21:29:32 -06:00
Nathan Sobo dd5c9ff6d4 Remove stray logging 2014-07-08 21:06:34 -06:00
Nathan Sobo 29179d0bbc Merge pull request #2867 from atom/ns-react-empty-line-invisibles
Render empty line invisibles in React editor
2014-07-08 20:54:41 -06:00
Kevin Sawicki f6400a4097 Upgrade to settings-view@0.133 2014-07-08 16:30:43 -07:00
Nathan Sobo e170b9f56b Render line-ending invisibles on empty lines
Fixes #2857

Including correct interleaving with indent guides.
2014-07-08 16:53:06 -06:00
probablycorey 2ea8418c66 Prepare 0.114.0 2014-07-08 15:38:08 -07:00
probablycorey c20a4a3084 Upgrade to release-notes@v0.35.0 2014-07-08 15:15:47 -07:00
Kevin Sawicki 0be64f9902 Upgrade to release-notes@0.34 2014-07-08 14:32:43 -07:00
Kevin Sawicki 5300fefef4 Prepare 0.113 2014-07-08 14:03:24 -07:00
Nathan Sobo 2602e6ec0a Merge pull request #2865 from atom/ns-react-fix-width-remeasurement
Streamline character width remeasurement to hopefully avoid exceptions
2014-07-08 14:27:26 -06:00
Nathan Sobo 1a22fc3c68 Streamline character width remeasurement to hopefully avoid exceptions
Previously, I was just remeasuring characters whenever the stylesheets
changed. I think there were situations in which the model changed, then
I remeasured characters prior to updating the view to match the model,
causing DOM exceptions. This switches the approach to only ever measure
characters after an update, ensuring the view always matches the model.
2014-07-08 14:17:39 -06:00
Kevin Sawicki 6d02861f11 Upgrade to release-notes@0.33 2014-07-08 13:13:49 -07:00
Corey Johnson 57ed190ea3 Merge pull request #2859 from atom/cj-windows-updater
Add autoUpdater shim for Windows
2014-07-08 12:52:45 -07:00
probablycorey 436d7de817 Send empty event arg 2014-07-08 11:46:04 -07:00
probablycorey a9feed2e4a Maintain autoUpdater listeners even if the version is in dev mode.
This is so we can test the auto-updater
2014-07-08 11:41:41 -07:00
Kevin Sawicki 8b04e94d09 Upgrade to apm 0.71 2014-07-08 11:38:53 -07:00
Ben Ogle 5c5576c39d Use right margins for toolbar btn-groups rather than left.
Fixes #2830
2014-07-08 11:18:48 -07:00
Ben Ogle 2b957beeda 💄 Fix ugly test 2014-07-08 11:18:47 -07:00
probablycorey 832aeffd4f Add basic updater spec 2014-07-08 11:12:28 -07:00
Kevin Sawicki 5d08ecdcb2 Remove logging in specs 2014-07-08 10:57:22 -07:00
Nathan Sobo 997529774c Clean up after stylesheet applications in editor-component-spec 2014-07-08 11:55:50 -06:00
Nathan Sobo 48d20ff1ec Only remeasure char widths on stylesheet changes if editor is visible
Fixes #2856
2014-07-08 11:46:23 -06:00
Kevin Sawicki 0793f291d1 Prepare 0.112 2014-07-08 10:23:06 -07:00
Kevin Sawicki 8d479328ec Upgrade to language-ruby@0.32 2014-07-08 09:29:04 -07:00
Kevin Sawicki 569326e76a Upgrade to language-sql@0.9 2014-07-08 09:17:44 -07:00
Kevin Sawicki 8372b84e9f Prepare 0.111 2014-07-07 18:23:21 -07:00
Ben Ogle eda55156e5 Merge pull request #2819 from atom/bo-decoration-api
Update the decoration API
2014-07-07 18:06:35 -07:00
Kevin Sawicki c40a526302 Only require core specs to pass on Windows
Still ironing out some flaky package specs that occasionally fail
2014-07-07 18:02:54 -07:00
Ben Ogle 540b038ced Add is destroyed flag to decoration 2014-07-07 17:48:40 -07:00
Ben Ogle ce1ebec253 Fix specs 2014-07-07 17:48:24 -07:00
probablycorey 44e121c997 Add autoUpdater shim for Windows 2014-07-07 17:07:42 -07:00
Nathan Sobo 3579404bed Merge pull request #2858 from atom/ns-react-fix-wrap-guide
Make React editor indent guide work like it did in the old editor
2014-07-07 18:07:36 -06:00
Kevin Sawicki 1e19860409 Upgrade to markdown-preview@0.90 2014-07-07 17:03:02 -07:00
Ben Ogle eab4b578a3 Upgrade packages to use new decoration APIs 2014-07-07 17:01:49 -07:00
Nathan Sobo 2878196e0a Make React editor indent guide work like it did in the old editor
Fixes #2367

* The indent level of empty lines is the *max* of the nearest non empty
  line, rather than favoring the level of the line below.

* An extra wrap guide is no longer rendered for empty lines

I didn't port the specs over because we already had good coverage at the
model level. It just needed to be updated for the preferred behavior.
2014-07-07 17:59:26 -06:00
Kevin Sawicki 1c037411e9 Ignore domhandler tests 2014-07-07 16:09:40 -07:00
Kevin Sawicki 68144681b2 💄 2014-07-07 16:05:01 -07:00
Kevin Sawicki 484a516bd6 Relative path might be missing 2014-07-07 16:03:28 -07:00
Kevin Sawicki fa6e84415b Ignore gaze from jasmine-node
This is only used when jasmine-node is being launched from the CLI
with --autotest/--watch which the bundled spec runner does not use
or expose.

This reduces all bundled paths to be under 200 characters relative
to the root install location.
2014-07-07 15:57:38 -07:00
Kevin Sawicki 7117634ba8 Ignore more test directories 2014-07-07 15:57:38 -07:00
Kevin Sawicki a108c283cf Add grunt task to log long paths in built app 2014-07-07 15:57:38 -07:00
Kevin Sawicki 3dc61f4a7a Ignore more test directories 2014-07-07 15:57:37 -07:00
Nathan Sobo 9685e3f1db Merge pull request #2855 from atom/ns-active-pane-deserialization
Move serialization of active pane from Pane to PaneContainer
2014-07-07 16:49:29 -06:00
Nathan Sobo b2c70f9e69 Move serialization of active pane from Pane to PaneContainer
Fixes #2694
Fixel #2853

Previously, we were storing an `active` boolean for each pane. We've
had some strange bugs where every pane is serializing `active: false`,
which causes exceptions when loading up the stored data.

This new approach serializes the activePaneId on the PaneContainer
itself. Since the PaneContainer is the source of truth regarding the
active pane, it makes more sense to handle it here.

This unfortunately changes the serialization version for the
PaneContainer, so people won't have their state persisted after
upgrading. But it seems better than leaving cruft to handle the old
serialization situation.
2014-07-07 16:36:10 -06:00
Ben Ogle d7a3ffa9de Handle Decoration::update 2014-07-07 15:13:04 -07:00
Nathan Sobo 18ed91a402 Merge pull request #2852 from atom/ns-react-remeasure-characters-on-stylesheet-change
Re-measure character widths when stylesheets change
2014-07-07 15:47:29 -06:00
Ben Ogle e991b3d10c Move from addDecoration -> decorateMarker 2014-07-07 14:43:56 -07:00
Nathan Sobo f1b7f9ca30 Merge pull request #2851 from atom/ns-react-autoscroll-on-undo
Autoscroll to cursor on undo
2014-07-07 15:42:10 -06:00
Nathan Sobo e1e510e473 Re-measure character widths when stylesheets change
Fixes #2845
2014-07-07 15:39:00 -06:00
Nathan Sobo d042d15a50 Autoscroll to cursor on undo
Fixes #2815

This commit changes our autoscroll strategy for cursors significantly.

Originally, we were autoscrolling whenever the cursor's marker changed
positions. This worked well, except we didn't end up autoscrolling when
the user *attempted* to move the cursor to an invalid position, such as
moving down at the end of the buffer, due to the fact that the marker
wouldn't change.

Then, we moved to always requesting an autoscroll whenever a position
change was requested via Cursor::changePosition. This missed out on
moving the cursor when inserting text, so we then also added an explicit
autoscroll call when inserting text.

This had the problem of not autoscrolling due to undo. So finally, this
solution combines explicit autoscroll in ::changePosition to capture
intent, as well as implicit autoscrolling whenever the cursor's marker
position changes due to a textual change in the buffer. This captures
undo/redo correctly.
2014-07-07 15:21:48 -06:00
Ben Ogle fe9fec733d Stub out Decoration::destroy and Decoration::update 2014-07-07 14:19:20 -07:00
Kevin Sawicki 06095e57d7 Prepare 0.110 2014-07-07 14:07:41 -07:00
Nathan Sobo b83f908e28 Merge pull request #2850 from atom/ns-react-account-for-padding-in-softwrap
Account for padding-left on scroll view when soft-wrapping lines in the React editor
2014-07-07 14:36:20 -06:00
Nathan Sobo fad2a63a14 Account for padding-left on the scroll view when soft-wrapping lines
Fixes #2844
2014-07-07 14:02:24 -06:00
Nathan Sobo 2de42303d4 💄 2014-07-07 13:55:32 -06:00
Nathan Sobo a7aed07d70 Merge pull request #2849 from atom/ns-react-fix-softwrap-scroll-left
Scroll React editor all the way left when soft wrap is enabled
2014-07-07 13:31:15 -06:00
Nathan Sobo 673b62f547 Scroll React editor all the way left when soft wrap is enabled
Fixes #2842
2014-07-07 12:26:33 -06:00
Ben Ogle 19835f2f66 Upgrade tabs to support mousewheel navigation 2014-07-07 11:04:24 -07:00
Kevin Sawicki 7474de8f7e Upgrade to markdown-preview@0.89 2014-07-07 10:50:07 -07:00
Kevin Sawicki 84c30ef6c5 Set initial concurrency to 1 on all platforms 2014-07-07 10:26:12 -07:00
Kevin Sawicki 0aa5fa9eeb Increase timeout on Windows CI 2014-07-07 10:14:38 -07:00
Kevin Sawicki b5f8b159fc Upgrade to settings-view@0.132 2014-07-07 10:05:16 -07:00
Kevin Sawicki 79357be899 Upgrade to markdown-preview@0.88 2014-07-07 09:29:21 -07:00
Kevin Sawicki 12d6a90ddc Upgrade to wrap-guide@0.21 2014-07-07 09:13:11 -07:00
Kevin Sawicki 4eb3be6f17 Upgrade to markdown-preview@0.87 2014-07-07 09:12:29 -07:00
Kevin Sawicki af622c6b74 Upgrade to wrap-guide@0.20 2014-07-07 07:37:51 -07:00
Kevin Sawicki df8e0a8464 📝 Add is-focused class to cursor example
This is required to take effect for the default Atom light syntax
theme.

Closes #2834
2014-07-06 10:08:24 -07:00
Kevin Sawicki a1c1879ba6 Merge pull request #2813 from atom/ks-codesign-on-windows-ci
Codesign on Windows CI
2014-07-05 11:48:39 -07:00
Kevin Sawicki d1e52d4105 Restore spec task 2014-07-05 11:29:10 -07:00
Kevin Sawicki 0f01840e3e Restore publish checks 2014-07-05 11:28:56 -07:00
Kevin Sawicki e1945fce14 Comment out Janky check 2014-07-05 11:15:56 -07:00
Kevin Sawicki e6ecf10616 Publish builds from this branch to test signing 2014-07-05 11:12:59 -07:00
Kevin Sawicki b85ebbad2a Separate /F argument to taskkill 2014-07-05 11:06:07 -07:00
Kevin Sawicki 38ba96a54f Break up commands into two spawns 2014-07-05 10:49:25 -07:00
Kevin Sawicki 334e2ef7ab Temporarily disable specs 2014-07-05 10:46:22 -07:00
Kevin Sawicki 58efeb8a20 Force kill on Windows 2014-07-05 10:45:48 -07:00
Kevin Sawicki 3ae6540c70 Kill all atom.exe before signing 2014-07-05 10:45:35 -07:00
Kevin Sawicki 497ac5e5ce Add kill command for Windows 2014-07-05 10:41:45 -07:00
Kevin Sawicki 8735780473 Reenable specs 2014-07-05 10:29:50 -07:00
Kevin Sawicki 888b5ab098 Always pass specs to test signing 2014-07-05 10:19:14 -07:00
Kevin Sawicki c897f42d51 Use JANKY_SIGNTOOL env var to sign 2014-07-05 10:19:14 -07:00
Kevin Sawicki 3c5312e834 signtool is now on the PATH 2014-07-05 10:19:14 -07:00
Kevin Sawicki c59cbb3b25 Use full path to signtool.bat 2014-07-05 10:19:13 -07:00
Kevin Sawicki b3da11edfb 💄 Use switch 2014-07-05 10:19:13 -07:00
Kevin Sawicki f56b487935 Call signtool on Windows 2014-07-05 10:19:13 -07:00
Kevin Sawicki 840abd6780 Upgrade to settings-view@0.131 2014-07-05 10:17:49 -07:00
Kevin Sawicki 2e554ac819 Use cross platform path in Project::replace spec 2014-07-05 10:01:19 -07:00
Kevin Sawicki 35c7bc0eef Upgrade to language-coffee-script@0.24 2014-07-05 08:35:49 -07:00
Ben Ogle d99a9b0f3f Merge pull request #2826 from atom/ns-flash-specs
Explicitly test removal of flash class prior to next animation frame
2014-07-04 09:53:55 -07:00
Nathan Sobo 7ac8b80172 Explicitly test removal of flash class prior to next animation frame 2014-07-04 09:56:51 -06:00
Ben Ogle 68f2bd56f0 Upgrade find-and-replace to flash the current result 2014-07-03 17:51:43 -07:00
Ben Ogle e709b986cd Upgrade themes to fix atom/tabs#64 2014-07-03 17:51:21 -07:00
Ben Ogle 74bdd5f0e8 Merge pull request #2794 from atom/bo-flash
Add ability to 'flash' selections
2014-07-03 17:48:08 -07:00
Ben Ogle 48b6c24882 Add Editor::selectionFlashDuration rather than magic number 2014-07-03 17:36:45 -07:00
Ben Ogle e5f800ef35 💄 2014-07-03 17:32:38 -07:00
Ben Ogle 492022fdd8 Fix spec 2014-07-03 17:32:38 -07:00
Ben Ogle cf7b87842e Upgrade all the themes
Removes flash / highlighted from ui themes
Adds flash color to syntax themes
2014-07-03 17:32:38 -07:00
Ben Ogle 1838ff2502 Use ‘flash’ class rather than ‘highlighted’.
Pull the flash into the base theme rather than the ui themes
2014-07-03 17:32:38 -07:00
Ben Ogle 505bfc28db fix spec 2014-07-03 17:32:37 -07:00
Ben Ogle abbe8d2eec Flash works for selections 2014-07-03 17:32:37 -07:00
Ben Ogle bf33d96899 Decorations can be flashed 2014-07-03 17:32:37 -07:00
Ben Ogle a56b5eef2f Remove the decoration update stuff 2014-07-03 17:32:37 -07:00
Ben Ogle 80eb31679f Add a Decoration object. Rework to use this object 2014-07-03 17:32:37 -07:00
Ben Ogle 54039e9d3b Don’t use state. Modify the dom directly 2014-07-03 17:32:37 -07:00
Ben Ogle 92c28fc44f 💄 2014-07-03 17:32:37 -07:00
Ben Ogle bc67efb72b 💄 Waaay less awkward 2014-07-03 17:32:37 -07:00
Ben Ogle 0ee4d864be Move flashing into the highlight component 2014-07-03 17:32:37 -07:00
Ben Ogle 1d724339d6 Don’t use attributes 2014-07-03 17:32:37 -07:00
Ben Ogle ce90b72807 Handle the decoration + highlighted in the selection 2014-07-03 17:32:37 -07:00
Ben Ogle 4f356121d7 Handle decoration updates in the editor-component 2014-07-03 17:32:37 -07:00
Ben Ogle 7b19152a58 Add updateDecorationForMarker() 2014-07-03 17:32:37 -07:00
Ben Ogle 15da69287e Upgrade tabs, fix flicker issue 2014-07-03 17:23:03 -07:00
Kevin Sawicki 8d8db5142f Upgrade to language-javascript@0.33 2014-07-03 15:44:28 -07:00
Kevin Sawicki 6d7881bcfe Upgrade to language-less@0.12 2014-07-03 15:29:52 -07:00
Nathan Sobo c2b7955ec6 Adjust DisplayBuffer::longestScreenRow when lines are inserted/removed
Fixes #2810

The line corresponding to the longest screen row moves when lines are
inserted or removed above it, so we need to adjust it accordingly or we
won't always realize when a change affects the longest line.
2014-07-03 16:15:49 -06:00
Ben Ogle cc073ae462 Merge pull request #2816 from atom/bo-remove-fnr-marker-less
Remove fnr marker less from themes, and into fnr
2014-07-03 14:59:56 -07:00
Ben Ogle 3348c0e75a Upgrade syntax themes to remove find-result marker css
It is now in find-and-replace based on syntax-variables. Better!
2014-07-03 14:43:58 -07:00
Ben Ogle 376a850507 Update find-and-replace to set the marker css 2014-07-03 14:27:46 -07:00
Ben Ogle 168c6cdbca Revert "Move the find-and-replace marker css into the base theme "
This reverts commit 942041f214.
2014-07-03 14:22:58 -07:00
Nathan Sobo 9ece33dbfe Handle double and triple click with command key held down
Fixes #2812
2014-07-03 15:18:53 -06:00
Ben Ogle 942041f214 Move the find-and-replace marker css into the base theme 2014-07-03 14:12:23 -07:00
Nathan Sobo 260be2e096 Autoscroll *after* inserting text, not before
Fixes #2787
2014-07-03 14:47:43 -06:00
Kevin Sawicki 6c8b4de986 Upgrade to settings-view@0.130 2014-07-03 13:38:32 -07:00
Kevin Sawicki 9b267728d0 Upgrade to language-ruby@0.31 2014-07-03 13:07:52 -07:00
Kevin Sawicki 3360d8500f Upgrade to bracket-matcher@0.48 2014-07-03 10:58:57 -07:00
Nathan Sobo a4ed02c3c5 Update lines for line insertions/removals preceding rendered row range 2014-07-03 11:22:57 -06:00
Kevin Sawicki 5658f9ab07 Upgrade to language-coffee-script@0.23 2014-07-03 10:08:35 -07:00
Kevin Sawicki c890e56cef Upgrade to language-javascript@0.32 2014-07-03 09:49:46 -07:00
Kevin Sawicki 5d22ce7128 Prepare 0.109 2014-07-03 09:33:18 -07:00
Kevin Sawicki 758abf8c8a Clone grunt-coffeelint via https
Closes #2809
2014-07-03 09:12:48 -07:00
Kevin Sawicki 9e90d09428 Upgrade to language-yaml@0.11 2014-07-03 08:59:29 -07:00
Kevin Sawicki 092dac7625 Group build and install dir together 2014-07-02 14:33:44 -07:00
Kevin Sawicki c129842037 Support --install-dir option
This will install the build to a custom location

Closes #2688
2014-07-02 14:10:39 -07:00
Kevin Sawicki 4bb7e0f323 === not !== for no-quiet check 2014-07-02 13:55:58 -07:00
Kevin Sawicki 7b09fc04da Don't ignore stdout when --no-quiet is set 2014-07-02 13:51:52 -07:00
Kevin Sawicki 1090746cb1 Add --no-quiet option to script/bootstrap
This will run apm/npm commands without the --quiet flag to get more
output on failures.
2014-07-02 13:46:12 -07:00
Kevin Sawicki 294a7ce6d3 Upgrade to apm@0.70 2014-07-02 13:17:46 -07:00
Kevin Sawicki 26c1bf2075 Upgrade to bookmarks@0.26 2014-07-02 13:17:19 -07:00
Kevin Sawicki ec1d97a7c9 Prepare 0.108 2014-07-02 10:09:02 -07:00
Kevin Sawicki a92eed5107 Upgrade to background-tips@0.15 2014-07-02 09:51:09 -07:00
Nathan Sobo 66319ca9c0 Merge pull request #2801 from atom/ns-react-fix-jitter
Fix jitter in React editor
2014-07-02 10:34:01 -06:00
Nathan Sobo 17fa580ecd Ignore 'scroll' events when an update is pending
This prevents feedback loops where we handle stale 'scroll' events
for scrolls requested in the model layer. It prevents jitter when
autoscrolling with the cursor.
2014-07-02 10:11:35 -06:00
probablycorey 2585c10688 Upgrade to language-less@v0.11.0 2014-07-02 09:03:46 -07:00
Nathan Sobo 7202f497db Pause scroll view measurement in requestAnimationFrame helper method 2014-07-02 09:30:44 -06:00
Nathan Sobo 9508909a9f Don't defer updates with setImmediate in animation frames
I previously thought this was okay, but now I'm experiencing jitter when
scrolling with the trackpad when updates are deferred, and the frames
seem jagged. So this commit restores a synchronous approach to display
updates whenever we use animation frames.
2014-07-02 09:26:24 -06:00
Nathan Sobo e5ab2c6507 Pause scroll view measurement when requesting animation frames
We don't want any extra DOM reading that could introduce hitches in
the animation we're running.
2014-07-02 08:47:32 -06:00
Nathan Sobo 8add5ccd7e Remove unused EditorComponent::componentWillUpdate hook 2014-07-02 08:46:56 -06:00
Kevin Sawicki d3829e2fc6 Merge pull request #2792 from atom/document-atom-io-stargazers
Document stargazers endpoint for atom.io
2014-07-01 16:08:32 -07:00
Kevin Sawicki c26f6cc7f7 Add the 2014-07-01 16:08:18 -07:00
Kevin Sawicki 3250888e05 Add missing comma 2014-07-01 15:55:13 -07:00
Kevin Sawicki 2e6ef6848a Fence blocks as JSON 2014-07-01 15:55:02 -07:00
Ben Ogle 74bcbf6291 Upgrade themes to fix blurry tabs
Refs atom/tabs#62
2014-07-01 15:46:47 -07:00
Daniel Hengeveld ab947082dc add stargazers docs for apm 2014-07-01 15:29:04 -07:00
probablycorey 9e31bc5179 Remove runs description 2014-07-01 14:26:44 -07:00
Corey Johnson be1a2f9e30 Merge pull request #2784 from maschs/ms-writingSpecsMD
writing-specs.md: Add examples for async/promise specs
2014-07-01 14:22:12 -07:00
Kevin Sawicki 9fe887191d Upgrade to whitespace@0.23 2014-07-01 13:55:04 -07:00
Ben Ogle b0031e493e Merge pull request #2737 from atom/bo-fix-indent-guide
Fix indent guide
2014-07-01 13:46:25 -07:00
Ben Ogle 1fa6661efd Remove the awkward _.pick 2014-07-01 11:48:36 -07:00
Nathan Sobo 8b57bb3309 Merge pull request #2789 from atom/ns-react-disable-gpu-option
Add editor.gpuDisabled option to prevent React editor from using layers
2014-07-01 12:48:34 -06:00
Kevin Sawicki 8b2e1b088a Merge pull request #2788 from atom/ks-add-chocolatey-ignores
Add chocolatey ignores
2014-07-01 11:48:12 -07:00
Ben Ogle dcb0d9b039 Update editor component specs 2014-07-01 11:41:44 -07:00
Nathan Sobo 4efabd2b5e 💄 method name 2014-07-01 12:34:00 -06:00
Nathan Sobo 18d17b55b5 Pass useHardwareAcceleration property down to CursorComponent instances 2014-07-01 12:33:45 -06:00
Ben Ogle 718e1228bd Add checks for the change event 2014-07-01 11:32:04 -07:00
Kevin Sawicki 22b0a35dba Add comment mentioning chocoloatey 2014-07-01 11:29:33 -07:00
Kevin Sawicki e395b1416a Add chocolatey gui for atom.exe 2014-07-01 11:19:54 -07:00
Nathan Sobo 0edfbaebeb Rename editor option to useHardwareAcceleration 2014-07-01 12:17:43 -06:00
Ben Ogle 3e57fb8e9a 💄 naming 2014-07-01 10:59:42 -07:00
Nathan Sobo 512d4da587 Add editor.gpuDisabled option to prevent React editor from using layers
When gpuDisabled is true, we use `translate` instead of `translate3d`
to position various elements, preventing the creation of GPU layers.
2014-07-01 11:56:05 -06:00
Ben Ogle de0e945c5c More specs in tokenized buffer testing empty line retokenizing 2014-07-01 10:54:37 -07:00
Ben Ogle & Nathan Sobo 4642d96f39 Tokenize empty lines with a changed indent level synchronously 2014-07-01 10:54:37 -07:00
Ben Ogle de2930fe99 💄 2014-07-01 10:54:37 -07:00
Ben Ogle 65c2f26656 Little note 📝 2014-07-01 10:54:36 -07:00
Ben Ogle 8ca709eb6a Fix spec name 2014-07-01 10:54:36 -07:00
Ben Ogle 43e88f6515 Invalidate whitespace lines when their indent level changes
Refs #2376
2014-07-01 10:54:36 -07:00
Ben Ogle d97eacc2f9 Add isOnlyWhitespace() 2014-07-01 10:54:36 -07:00
Kevin Sawicki a70367c70b Add chocolatey ignore for ctags-win32.exe 2014-07-01 10:45:32 -07:00
Ben Ogle d60c718fe2 Merge pull request #2783 from atom/bo-up-scandal
Upgrade scandal to handle file read errors
2014-07-01 10:45:27 -07:00
Kevin Sawicki fe838375a1 Add chocolatey ignore for node.exe 2014-07-01 10:45:25 -07:00
Ben Ogle 06d06d10e0 💄 2014-07-01 10:45:13 -07:00
Ben Ogle de9f070f53 Upgrade find-and-replace
It will display errors from scandal.
2014-07-01 10:45:13 -07:00
Ben Ogle a6e437b9d3 Upgrade scandal
This version emits events when errors are encountered with file reading.
2014-07-01 10:44:30 -07:00
Ben Ogle 44b95fc637 Emit errors from the out of process searches 2014-07-01 10:44:30 -07:00
Nathan Sobo e93e4e9333 Autoscroll to the last cursor in model when inserting text
Fixes #2787
2014-07-01 11:37:17 -06:00
Nathan Sobo d4a7bff525 Merge pull request #2608 from philschatz/ps-dedupe-context-menu
remove duplicate context menu entries
2014-07-01 11:08:18 -06:00
Nathan Sobo 5e78bbf471 Upgrade fuzzy finder to support traversing symlinked directories 2014-07-01 10:53:59 -06:00
Kevin Sawicki 873abd68af Merge pull request #2767 from smashwilson/ignore-desktop
Ignore generated files in resources/linux.
2014-07-01 09:50:11 -07:00
Nathan Sobo d42a064a44 Merge pull request #2773 from atom/ns-react-fix-delete-line-jitter
Fix scroll jitter when deleting a line reduces the maximum allowed scrollTop
2014-07-01 09:27:58 -06:00
Nathan Sobo 32c8a3ce99 Only adjust scrollTop when deleting lines when using the React editor 2014-07-01 09:16:29 -06:00
Nathan Sobo a99bde4e2d Reassign scrollTop if deleting lines decreases the max scrollTop
Fixes #2725
2014-07-01 09:01:04 -06:00
Maximilian Schüßler 5753680b58 Minor changes 2014-07-01 13:26:47 +02:00
Maximilian Schüßler 68ddbd9e75 📝 Add examples for async/promise specs 2014-07-01 02:51:47 +02:00
probablycorey e6725c9fcb Fix prepare docs 2014-06-30 11:48:10 -07:00
Corey Johnson b14317cf50 Merge pull request #2753 from atom/cj-dh-publish-docs
Build and publish API docs
2014-06-30 11:09:05 -07:00
Nathan Sobo bb6a44a757 Hard code node-runas to 0.5.4 trying to fix the build 2014-06-30 17:32:01 +01:00
Nathan Sobo 431fc725ff Interpret editor clicks relative to lines div, not the scrollView div
Fixes #2668

If the scroll view has padding, using it as the basis for locating
clicks relative to the lines is problematic.
2014-06-30 16:24:07 +01:00
Ash Wilson 72d5a4cdae Ignore generated files in resources/linux. 2014-06-29 09:34:24 -04:00
Nathan Sobo f5517bad66 Merge pull request #2757 from atom/ns-better-default-decorations
Improve default decorations for cursor and selection lines in React editor
2014-06-28 16:04:12 +01:00
Kevin Sawicki a63797019d Upgrade to language-less@0.10 2014-06-28 15:57:28 +01:00
Nathan Sobo 324f1392a3 Revert changes related to the .selection-line class
We will introduce .selection-line as part of a separate effort, not the
React switchover.
2014-06-28 15:52:10 +01:00
Nathan Sobo 21ae33f749 Merge pull request #2763 from atom/ns-react-fix-autoscroll
Autoscroll cursor when attempting to move it, even if it doesn't move
2014-06-28 15:42:31 +01:00
Nathan Sobo 15ca3e2a40 Match existing editor's behavior for .cursor-line class 2014-06-28 15:39:22 +01:00
Nathan Sobo ea9f5eb1c7 💄 Unify specs for all line decorations 2014-06-28 15:39:22 +01:00
Nathan Sobo 7f70b41696 Update the specs for .cursor/selection-line decorations 2014-06-28 15:39:22 +01:00
Nathan Sobo 9a6510c938 Add .cursor-line-no-selection decoration for backward compatibility 2014-06-28 15:39:22 +01:00
Nathan Sobo 825910dc1d Add onlyEmpty and onlyNonEmpty decoration options 2014-06-28 15:39:22 +01:00
Nathan Sobo bd238d6885 Add specs for gutter decoration options
- onlyHead
- onlyEmpty
- onlyNonEmpty
2014-06-28 15:39:22 +01:00
Nathan Sobo 8435e0176b Add selection-line class to old editor gutter for forward-compatibility
The React editor does not apply the .cursor-line-no-selection class,
but instead relies on a combination of .cursor-line and .selection-line
for selectors that want to target the cursor line when there is no
selection.

This allows themes to be upgraded to support the React editor and the
old editor at the same time.
2014-06-28 15:39:21 +01:00
Nathan Sobo 5bdaf3cbe4 Make both .cursor-line and .selection-line opaque 2014-06-28 15:39:21 +01:00
Nathan Sobo f5e54b0ba6 Only add 'selection-line' decoration when marker is non-empty 2014-06-28 15:39:21 +01:00
Nathan Sobo fa7e388352 Add 'onlyEmpty' and 'onlyNonEmpty' decoration options 2014-06-28 15:39:21 +01:00
Nathan Sobo 70f352251e Only apply cursor-line decoration to head; Add selected-line decoration.
The cursor-line decoration shouldn't be applied to every line that's
selected. It should only be applied to the location of the cursor. We'll
need to update themes to reflect this.
2014-06-28 15:39:21 +01:00
Nathan Sobo 1b05708d7a Update addDecorationForMarker docs to talk about 'onlyHead' option 2014-06-28 15:39:21 +01:00
Nathan Sobo a2b90cd501 Add 'onlyHead' option for decorations
It only decorates the head position of the decoration's marker.
2014-06-28 15:39:21 +01:00
Nathan Sobo 61c7e797b9 Upgrade markdown-preview to hopefully fix flaky spec 2014-06-28 15:38:59 +01:00
Nathan Sobo b689ffd402 Autoscroll cursor when attempting to move it, even if it doesn't move 2014-06-28 15:26:02 +01:00
Nathan Sobo 71fb063a67 Un-f 2014-06-28 15:24:24 +01:00
Nathan Sobo b376bd8688 Fix scrollbar dragging in React editor
Fixes #2751
2014-06-28 11:33:41 +01:00
Daniel Hengeveld 126d0d1b3c Add stability message for Atom.io API
This indicates that the Atom.io API is not frozen - this is describing the state
of things, not announcing a new policy.
2014-06-27 12:33:50 -07:00
probablycorey e068d3d293 Merge remote-tracking branch 'origin/master' into cj-dh-publish-docs 2014-06-27 11:04:23 -07:00
probablycorey a49221e359 Upgrade to language-go@v0.13.0 2014-06-27 10:32:14 -07:00
probablycorey e7aef25f1f Update tokenized buffer specs 2014-06-27 10:18:04 -07:00
probablycorey 071b391994 Describe surrogate pair as UTF-8 surrogate pair 2014-06-27 10:17:28 -07:00
probablycorey 7b11343ea8 Remove semi-colon 2014-06-27 09:37:05 -07:00
probablycorey d25f432400 Upgrade to tree-view@v0.108.0 2014-06-27 09:36:12 -07:00
probablycorey 2e16f2dc3f Upgrade to first-mate@1.7.1 2014-06-27 09:31:19 -07:00
probablycorey f828b91686 Only prepare docs on darwin platforms. 2014-06-27 08:53:43 -07:00
probablycorey 3f4210c293 Only publish build if on janky and using the master branch 2014-06-27 08:52:12 -07:00
Kevin Sawicki 0f7b97821b Upgrade ot markdown-preview@0.85 2014-06-27 12:44:20 +01:00
Kevin Sawicki efa457bade Upgrade to settings-view@0.129 2014-06-27 12:33:06 +01:00
Kevin Sawicki 61188cb05f Upgrade to image-view@0.36 2014-06-27 09:42:26 +01:00
Kevin Sawicki 69c3001836 Upgrade to language-javascript@0.30 2014-06-27 09:35:01 +01:00
probablycorey 81afb89d27 Copy API docs to the build dir 2014-06-26 16:14:54 -07:00
Corey Johnson & Daniel Hengeveld 2107b10778 Add upload-assets grunt task 2014-06-26 15:02:18 -07:00
Corey Johnson & Daniel Hengeveld bc31f94833 Add getAssets method 2014-06-26 15:01:26 -07:00
Corey Johnson & Daniel Hengeveld 58c2cec787 Rename sourceName to sourcePath 2014-06-26 14:37:21 -07:00
Corey Johnson & Daniel Hengeveld 2c95af63e6 Rename zipApp to zipAssets 2014-06-26 14:33:09 -07:00
Corey Johnson & Daniel Hengeveld 8a377c9339 Make docs output dir a config var 2014-06-26 14:30:43 -07:00
Corey Johnson & Daniel Hengeveld e21f561af5 Add Daniel to pairs file 2014-06-26 14:25:40 -07:00
probablycorey ccb01c23d2 💄 Add spacing between packages and languages packages 2014-06-26 11:53:37 -07:00
probablycorey 3bc50c9b2c Upgrade to language-javascript@v0.29.0 2014-06-26 11:52:52 -07:00
probablycorey 18c5f9c8de Upgrade to tree-view@0.107.0 2014-06-26 11:52:06 -07:00
Ben Ogle 7179bc5af1 Merge pull request #2738 from atom/bo-fix-max-scroll-width
Fix max scroll width in react editor
2014-06-25 18:16:32 -07:00
Nathan Sobo 3bf0c73170 Assign line width explicitly to prevent full screen repaints
Fixes #2746
2014-06-25 19:13:50 -06:00
Nathan Sobo 95242c8c82 Merge pull request #2747 from atom/ns-set-immediate
Use setImmediate instead of nextTick to batch React editor updates
2014-06-25 18:48:47 -06:00
Nathan Sobo eb84737109 Fix specs for use of setImmediate instead of nextTick in requestUpdate 2014-06-25 18:38:06 -06:00
Nathan Sobo 2b54c9bebe Use setImmediate to batch all editor updates, even in animation frames
When I was using nextTick to batch updates, there were issues with
flicker. So I was attempting to always update synchronously in animation
frames, which was complicated. setImmediate doesn't cause the flicker
however, so I'm able to remove the special logic for sync updates in
animation frames and just use it across the board.
2014-06-25 18:20:49 -06:00
Nathan Sobo 63e8099088 Allow successive accented characters to be inserted in React editor
Refs #2732

Because we're only checking the length of the input element's selection
in the React editor on textinput events and not also its content, we
were mistaking some IME compositions as accented character menu
insertions. Clearing the content of the input on 'compositionend'
prevents this issue.
2014-06-25 18:19:53 -06:00
Ben Ogle & Nathan Sobo f739dce210 Only recompute scroll width once for each batch of measured chars 2014-06-25 15:26:13 -07:00
Ben Ogle & Nathan Sobo 77389b0518 Update scrollWidth when the max line length / default char width changes 2014-06-25 15:26:13 -07:00
Ben Ogle 809804d0cc 💄 2014-06-25 15:26:13 -07:00
Ben Ogle 8054b769d6 Default scrollWidth to 0 2014-06-25 15:26:13 -07:00
Ben Ogle e3c3779a73 Don’t need to return the list. So just return 2014-06-25 15:26:13 -07:00
Ben Ogle 196f64d846 Fix specs 2014-06-25 15:26:13 -07:00
Ben Ogle 9cc1244f32 Compute the longest line width based on the longest line 2014-06-25 15:26:13 -07:00
Ben Ogle 1c69995bb6 Upgrade command-palette with better description 2014-06-25 15:04:26 -07:00
Kevin Sawicki 7c4cbd8bf9 Upgrade to open-on-github@0.29.0 2014-06-25 13:04:51 -07:00
probablycorey 570f59a7e2 Upgrade to tree-view@0.106.0 2014-06-25 10:06:33 -07:00
Nathan Sobo 8d71e3f69a Merge pull request #2740 from atom/bo-round-scroll-vars
Never allow partial pixel values for scroll
2014-06-25 09:45:47 -06:00
Kevin Sawicki 0263d72551 Upgrade to language-gfm@0.42 2014-06-25 08:30:37 -07:00
Kevin Sawicki 9299ff3404 📝 Remove observeConfig
Replaced with subscribe/atom.config.observe

Closes #2742
2014-06-25 08:11:30 -07:00
Cheng Zhao 7c79643b89 Upgrade to atom-shell@0.13.3 2014-06-25 09:52:51 +08:00
Kevin Sawicki 6a4b4d2efd Upgrade to language-gfm@0.41 2014-06-24 18:24:47 -07:00
Ben Ogle d6f217f80a Never allow partial pixel values for scroll 2014-06-24 18:09:03 -07:00
Nathan Sobo 1f94e89e56 Merge pull request #2739 from atom/ns-react-raf-vs-next-tick
Only perform a single synchronous update inside animation frames
2014-06-24 19:08:10 -06:00
Nathan Sobo 27a959ec16 Combine all updates that occur in an animation frame 2014-06-24 18:48:59 -06:00
Kevin Sawicki 0369d77c85 Ensure grammars are only activated once 2014-06-24 16:21:56 -07:00
Ben Ogle 866bc02d68 💄 Inline the gutter component 2014-06-24 14:47:26 -07:00
Ivan Žužak ae96d9aeaa Upgrade to tree-view@0.105.0 2014-06-24 22:15:42 +02:00
Nathan Sobo 5481b37d01 Merge pull request #2735 from atom/ns-react-precompute-pixel-rects
Compute pixel rects of cursors and highlights in EditorComponent
2014-06-24 13:34:56 -06:00
Nathan Sobo b127155805 Only pause cursor blink when cursors actually move
Not when they are just repositioned due to lineHeight/charWidth changes
2014-06-24 13:26:21 -06:00
Nathan Sobo 74dbfbc956 Add HighlightComponent::shouldComponentUpdate 2014-06-24 13:04:48 -06:00
Nathan Sobo f41a9739ac 💄 2014-06-24 13:02:41 -06:00
Nathan Sobo b75e748ec5 Restore pausing of cursor blink on cursor movement 2014-06-24 12:59:13 -06:00
Nathan Sobo 3f9fdad478 Precompute pixel rects for highlight decorations in EditorComponent 2014-06-24 12:56:52 -06:00
Nathan Sobo 0150b40376 Implement CursorComponent::shouldComponentUpdate
This prevents re-rendering cursors on blink, since only the class on
the outer component changes.
2014-06-24 12:42:58 -06:00
Nathan Sobo d3e6bd038f Precompute cursor pixel rects in EditorComponent and pass them down 2014-06-24 12:40:56 -06:00
Ben Ogle b7d8e581ee Merge pull request #2727 from atom/bo-subscribe-to-marker-changes
Subscribe to marker changes
2014-06-24 11:15:47 -07:00
Kevin Sawicki daaf9be4bf Upgrade to language-java@0.11 2014-06-24 10:50:10 -07:00
Ben Ogle 396b21bc04 Fix specs failures caused by making lines 100% width 2014-06-24 10:32:48 -06:00
Kevin Sawicki d4617f1036 Upgrade to timecop@0.21 2014-06-24 09:04:09 -07:00
Kevin Sawicki 6cb5af0bfc Map ctrl-pageup/down to pane:show-next/previous-item
Closes #2724
2014-06-24 08:44:26 -07:00
Kevin Sawicki 1c2e997415 Merge pull request #2700 from atom/bo-grammar-preload
Preload grammars on deserialization
2014-06-24 08:26:57 -07:00
Kevin Sawicki 148b691734 Test grammars included across multiple packages 2014-06-24 08:14:11 -07:00
Ben Ogle 9b577ecbf8 Make lines 100% of the width of their container
This is part of the solution to #2701. Lines need to be 100% wide in
case a class styles their background.
2014-06-23 22:46:27 -06:00
Ben Ogle d57119793b Properly disable nextTick when calling requestAnimationFrame
My previous commit was nonsense because it set the ::performSyncUpdates
flag back to false before the animation frame callback ever got fired.

/cc again @benogle
2014-06-23 22:35:40 -06:00
Ben Ogle ccada33d57 Remove nextTick in spec 2014-06-23 22:27:40 -06:00
Ben Ogle 1d9514ca81 Don't call nextTick within requestAnimationFrame
This seems to be causing stutter when scrolling on the GPU. When I don't
use nextTick when requesting animation frames, the problem seems to go
away. Maybe there's some issue with the integration between the Node
and Chromium event loops plus sending things to the compositor.

/cc @benogle
2014-06-23 22:21:28 -06:00
Ben Ogle 5ebb17c2e8 Be defensive when iterating through decorations 2014-06-23 18:03:19 -07:00
Kevin Sawicki f741b1d6a6 Store timings for deserializing project and workspace 2014-06-23 17:46:44 -07:00
Ben Ogle 36280bb3a7 Add noop for resetDisplay
fixes #2674
2014-06-23 17:46:35 -07:00
Kevin Sawicki 15ccfac75a 💄 2014-06-23 17:46:31 -07:00
Kevin Sawicki 2e424baf2a Use correct expected call count 2014-06-23 17:41:33 -07:00
Kevin Sawicki 0547d5a78b Assert grammars are sync loaded on deserialize 2014-06-23 17:36:14 -07:00
Kevin Sawicki 5529f13cc6 Only create grammar load promise once 2014-06-23 17:33:05 -07:00
Ben Ogle 058ab7d486 Upgrade find-and-replace to clean up specs 2014-06-23 17:16:07 -07:00
Kevin Sawicki 0a54233ef0 Merge branch 'master' into bo-grammar-preload 2014-06-23 17:05:48 -07:00
Ben Ogle b4f4ef8ec4 💄
Make it not suck.
2014-06-23 17:04:32 -07:00
Kevin Sawicki e11785ce98 Serialize packages names in Workspace 2014-06-23 16:56:46 -07:00
Kevin Sawicki b1d7de8d43 Add spec for serializing active grammars 2014-06-23 16:41:46 -07:00
Kevin Sawicki becdca0858 Store grammars in Atom::unloadEditorWindow 2014-06-23 16:30:02 -07:00
Kevin Sawicki c9e3ca3d69 Remove logging 2014-06-23 16:23:07 -07:00
Kevin Sawicki 6336ffbf44 Store included grammar scopes 2014-06-23 16:22:37 -07:00
Kevin Sawicki 6aeca79d1b Return empty promise when already loaded 2014-06-23 16:13:13 -07:00
Kevin Sawicki e76b24f8ad Catch error 2014-06-23 16:04:25 -07:00
Kevin Sawicki 0304f187dd Remove preload request from deserializeParams 2014-06-23 16:03:56 -07:00
Kevin Sawicki 968ab0e41d Remove unused methods 2014-06-23 16:02:45 -07:00
Kevin Sawicki ea6feddd7b Track duration of grammar preload 2014-06-23 16:00:58 -07:00
Ben Ogle f381abcbad Re-render when a marker changes
fixes #2705
2014-06-23 16:00:36 -07:00
Kevin Sawicki bb5d628397 Track packages to preload in Atom class 2014-06-23 15:59:26 -07:00
Kevin Sawicki f3d87b1653 Set packageName property on Grammar objects 2014-06-23 15:58:06 -07:00
Ben Ogle & Nathan Sobo 76a911f17a Render highlights immediately to support underlayer shim 2014-06-23 16:23:45 -06:00
Ben Ogle 7139fd9f98 Conditionally render the gutter for the showLineNumbers option
Fixes #2707
2014-06-23 15:22:16 -07:00
Kevin Sawicki 64e2b53baa Add cursor with ctrl-click on Windows/Linux
Closes #2105
2014-06-23 14:43:00 -07:00
Kevin Sawicki 78630a14fd Upgrade to language-yaml@0.10 2014-06-23 14:12:50 -07:00
Kevin Sawicki 38fbcbdf89 Upgrade to symbols-view@0.59 2014-06-23 14:11:14 -07:00
probablycorey 6e102c7e1e Rename regex var to a more appropriate name 2014-06-23 10:51:58 -07:00
Kevin Sawicki f40c8a97c0 Upgrade to markdown-preview@0.84 2014-06-23 10:43:40 -07:00
Nathan Sobo b9a3eca091 Correcly handle folds that end where other folds begin
Fixes #2247
2014-06-23 11:29:14 -06:00
Kevin Sawicki f9fcb1767b Upgrade to symbols-view@0.58.0 2014-06-23 10:00:17 -07:00
Kevin Sawicki 433843ba23 📝 Wrap line and use single backticks 2014-06-23 09:36:44 -07:00
Kevin Sawicki 598e752a9d Merge pull request #2713 from Theswweet/patch-1
Update linux.md to accomadate build issues
2014-06-23 09:32:01 -07:00
probablycorey c1142f6c6a Merge branch 'cj-make-sure-editor-events-are-called-in-the-correct-order' 2014-06-23 09:31:12 -07:00
Kevin Sawicki 937ff194b6 Upgrade to language-ruby-on-rails@0.15 2014-06-23 09:18:34 -07:00
probablycorey 9a5da3c27e Add next tick call 2014-06-23 09:13:39 -07:00
probablycorey 43cb9af4a4 Add editor-event spec 2014-06-23 08:51:17 -07:00
James Galizio 843c075779 Fixed typo's for proposed commit. 2014-06-22 11:59:11 -07:00
Ivan Žužak e13cf19daa Upgrade to welcome@0.17.0 2014-06-22 17:52:48 +02:00
Cheng Zhao 0eecf49e61 Merge pull request #2653 from deprint/desktop-file-fix
Fix for installation of desktop file
2014-06-22 11:42:21 +08:00
James Galizio 748d189079 Update linux.md to accomadate build issues
I ran into this when I installed today, and the inscribed method allowed me to complete my atom install on CrunchBang. I've seen a few issues having to do with this, so it might be advisable to have it in the troubleshooting section!
2014-06-21 20:36:55 -07:00
Kevin Sawicki 9d4c4a190f Upgrade to snippets@0.47 2014-06-21 07:14:22 -07:00
Kevin Sawicki ac2b84f21e Upgrade to timecop@0.20 2014-06-21 07:10:25 -07:00
Kevin Sawicki 610f515f68 Upgrade to language-yaml@0.9 2014-06-21 07:06:18 -07:00
Nathan Sobo 5348b912cc Merge pull request #2708 from atom/revert-2699-ns-react-fix-artifacts
Avoid GPU artifacts without rendering selections on another layer
2014-06-21 02:52:51 -06:00
Nathan Sobo 3fd4e57162 Render a dummy highlight decoration to prevent artifacts
When the last highlight gets removed, we get a rendering artifact.
Always rendering an empty dummy at 0,0 ensures that never happens.
2014-06-21 02:23:59 -06:00
Nathan Sobo 7c356d2592 Revert "Render highlights on their own layer to avoid GPU artifacts" 2014-06-21 01:58:11 -06:00
Ben Ogle 0dadce1047 Serialize all included grammar scopes 2014-06-20 17:04:21 -07:00
Ben Ogle 8c3bfaa3a2 Return when grammars are already loaded 2014-06-20 17:04:21 -07:00
Ben Ogle f8b8b22b75 Preload grammars on deserialization 2014-06-20 17:04:21 -07:00
Nathan Sobo e49414d2ec Merge pull request #2699 from atom/ns-react-fix-artifacts
Render highlights on their own layer to avoid GPU artifacts
2014-06-20 17:03:26 -06:00
Nathan Sobo 1361424673 Merge pull request #2702 from atom/ns-react-autoscroll-to-added-selections
Autoscroll to selections in model layer when added
2014-06-20 17:03:12 -06:00
Nathan Sobo e084bebb54 Autoscroll to selections in model layer when added
Fixes #2698
2014-06-20 16:53:46 -06:00
Nathan Sobo df8d014e3c Add a dedicated underlayer to avoid GPU artifacts on wrap guide etc
Trying to make the .highlights layer double as the .underlayer was
causing GPU artifacts on the wrap guide when the last highlight was
removed. This puts it in its own layer to avoid that.
2014-06-20 16:33:08 -06:00
Nathan Sobo d839ea9aa5 Don't render an opaque background behind line numbers
It doesn't help subpixel anti-aliasing like I thought, so screw it.
2014-06-20 16:07:19 -06:00
Nathan Sobo 6cdb1a188a Merge pull request #2681 from atom/ns-react-batch-updates
Batch all editor updates together automatically via process.nextTick
2014-06-20 15:20:25 -06:00
Nathan Sobo 4218e0a037 Render highlights on their own layer to avoid GPU artifacts
Previously, when the last highlight div was removed from the lines
layer, chunks of the lines would sometimes disappear. Since we've
discovered that giving the lines an opaque background doesn't help with
subpixel anti-aliasing anyway, I've found that rendering highlights on
their own layer behind the lines and making the lines layer transparent
avoids the arficacts.
2014-06-20 15:18:19 -06:00
Nathan Sobo 36a0da01cc Update markdown-preview to fix specs 2014-06-20 15:06:16 -06:00
Nathan Sobo ef2bdf6365 Only forceUpdate of EditorComponent on nextTick if it's mounted 2014-06-20 15:06:16 -06:00
Nathan Sobo ef1ec9b693 Emit events *after* update to prevent requesting update during an update
When updating synchronously in specs, we can't get away with requesting
an update before the previous update is completed. If we emit events
before the update, we have the potential for one of those events to
cause this to happen. Moving them to after is more correct anyway.
2014-06-20 15:06:16 -06:00
Nathan Sobo 68d0a99c6e Default EditorComponent to updating synchronously in specs
This commit adds a static property, EditorComponent.performSyncUpdates,
which can be used to control the update behavior of all editor
components. In addition, an instance property called performSyncUpdates
be assigned to control the update behavior of a specific instance.
2014-06-20 15:06:16 -06:00
Nathan Sobo 64f3938f5c Batch all editor updates together automatically via process.nextTick 2014-06-20 15:06:10 -06:00
Kevin Sawicki 3faecb5988 📝 Correct broken references 2014-06-20 13:57:50 -07:00
Kevin Sawicki bf50b4a128 Prepare 0.107 2014-06-20 13:55:56 -07:00
Kevin Sawicki 88df4d2f3e Merge pull request #2692 from atom/ks-select-page-up-down
Select page up/down
2014-06-20 13:22:04 -07:00
Kevin Sawicki 4136ff566b 📝 Correct spec description 2014-06-20 13:09:51 -07:00
Kevin Sawicki 2fe523a664 Add spec for Editor::selectPageUp/Down 2014-06-20 13:09:51 -07:00
Kevin Sawicki 148180adda Implement select page up/down in Editor 2014-06-20 13:09:27 -07:00
Justin Bradford 01a4032895 Add text selection using page up/down keys to the React-based editor 2014-06-20 13:09:16 -07:00
Justin Bradford 2b2b65ec82 Add command to select text using page up/down keys 2014-06-20 13:08:48 -07:00
Ben Ogle 5ffc063f0c Merge pull request #2693 from atom/bo-fix-gutter-prev-decorations
Fix caching of gutter's previous decorations
2014-06-20 12:52:22 -07:00
Ben Ogle dee0771dd7 Use ? in the conditional. 2014-06-20 12:50:42 -07:00
Ben Ogle aef6991ca8 Set the decorations and previousDecorations vars before loops
Both loops use both vars, so both need to be available before the 
diffing!
2014-06-20 11:29:18 -07:00
Ben Ogle e8db3e97ce Remove cached decorations for removed lines 2014-06-20 11:28:01 -07:00
Ben Ogle b1dd4f2e8e Index the previous decoration cache by lineNumberId rather than screenRow
Why? Screen rows change. If some operation (folding?) changes the 
screen rows and the decorations at the same time, the previous 
decorations will no longer be valid and can no longer be diffed against 
the decorations to-be-rendered.
2014-06-20 11:27:39 -07:00
Ben Ogle 633b08b9de Merge pull request #2682 from atom/bo-line-decorations
Render line decorations
2014-06-20 11:02:35 -07:00
Ben Ogle 1228435f9b 💄 2014-06-20 11:00:40 -07:00
Kevin Sawicki 02b5280587 Upgrade to language-ruby@0.30 2014-06-20 10:59:15 -07:00
Ben Ogle 2e47207701 Upgrade to git-diff 0.34.0 to fix spec 2014-06-20 10:54:10 -07:00
Ben Ogle 593b5b4e36 Use _.deepContains 2014-06-20 10:50:12 -07:00
Kevin Sawicki 1896c94775 Upgrade to language-c@0.21 2014-06-20 10:46:50 -07:00
Kevin Sawicki 4dc20e2027 Upgrade to tree-view@0.104 2014-06-20 09:18:53 -07:00
Kevin Sawicki 238e291888 Upgrade to language-javascript@0.28 2014-06-20 09:06:39 -07:00
Kevin Sawicki 5ccac143aa Upgrade to language-c@0.20 2014-06-20 08:38:10 -07:00
Kevin Sawicki ae97244664 📝 Tweak python install location note 2014-06-20 08:06:22 -07:00
Kevin Sawicki 859e3cd038 Merge pull request #2687 from grenade/patch-1
Added a hint about the required Python path.
2014-06-20 08:04:05 -07:00
Rob Thijssen 07577ff944 Added a hint about the required Python path.
In order to alert users that the Atom build scripts expect to find Python in the default installation folder.
2014-06-20 15:19:55 +01:00
Ben Ogle 72b1821828 Render line decorations. 2014-06-19 17:20:05 -07:00
Kevin Sawicki 781a51ac53 Merge pull request #2675 from atom/ks-bundle-dlls
Bundle DLLs
2014-06-19 16:27:38 -07:00
Kevin Sawicki 9055e650c6 Specify full destination path 2014-06-19 16:16:16 -07:00
Kevin Sawicki 5195a4aaa7 Copy dlls during build task 2014-06-19 16:16:16 -07:00
Kevin Sawicki 5e4f34f92c Update dlls 2014-06-19 16:16:16 -07:00
Kevin Sawicki dc7b549017 Add msvcr100.dll to win resources 2014-06-19 16:16:16 -07:00
Kevin Sawicki 29d5f63cd9 Update msvcp100.dll 2014-06-19 16:16:15 -07:00
Kevin Sawicki 33b4ec8e25 Add msvcp100.dll to win resources 2014-06-19 16:16:15 -07:00
Philip Schatz 67a1ed92db 💄 context menu tests 2014-06-19 19:14:34 -04:00
Ben Ogle 85abed2406 Merge pull request #2676 from atom/bo-cursor-gutter
Don’t render decorations on the last empty line when selection not empty
2014-06-19 15:10:18 -07:00
Ben Ogle 520ece4b13 💄 Wording 2014-06-19 15:09:49 -07:00
Ben Ogle 184068dc55 Add handlers for IME composition 2014-06-19 15:03:34 -07:00
Ben Ogle f27b897e91 Change message in scroll canary 2014-06-19 14:27:20 -07:00
Ben Ogle 6e201104bc Only fix the scroll position when the editor is mounted
fixes #2664
2014-06-19 14:24:47 -07:00
Ben Ogle 908a2978ae Don’t render decorations on the last empty line when selection not empty 2014-06-19 14:20:32 -07:00
Ben Ogle 2eb5ef0816 Merge pull request #2665 from atom/bo-gutter-selection
Implement gutter clicking and dragging to change selection on react editor
2014-06-19 13:48:40 -07:00
probablycorey 0c5f2cd067 Upgrade to language-gfm@0.40.0 2014-06-19 13:38:25 -07:00
Kevin Sawicki d1e60fb2a5 Upgrade to language-c@0.19 2014-06-19 13:22:16 -07:00
Nathan Sobo bee7be1d1a Fix errors refreshing directly after adding selection below/above 2014-06-19 13:43:10 -06:00
Ben Ogle bee4c9df8a Revert "Select to the end of the last row rather than beginning of row + 1"
This reverts commit c5815d2af9.
2014-06-19 12:06:09 -07:00
Ben Ogle c5815d2af9 Select to the end of the last row rather than beginning of row + 1 2014-06-19 12:05:17 -07:00
Ben Ogle 77717d3eff Fix spec 2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo d3e0005b33 💄 Break out separate methods for gutter click and shift-click 2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo 8295019891 Throw error when no animation frame was requested 2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo 2edcc517b1 Handle dragging in the gutter
Including shift-click dragging better than the old editor!!!!!!
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo 9083103bb3 Add click and shift-click in gutter 2014-06-19 12:04:36 -07:00
Ben Ogle & Nathan Sobo bc391094df 💄 Move helper 2014-06-19 12:03:18 -07:00
Kevin Sawicki ffba81a962 Prepare 0.106 2014-06-19 10:03:26 -07:00
Kevin Sawicki 1e1f4cf173 Merge pull request #2662 from atom/ks-align-hard-tabs
Align hard tabs
2014-06-19 09:41:15 -07:00
Ivan Žužak 7f04149f8d Upgrade to find-and-replace@0.120.0 2014-06-19 18:03:00 +02:00
Nathan Sobo cd1fb99142 Merge pull request #2667 from atom/ns-react-dont-measure-when-hidden
Don't measure character widths when editor is hidden
2014-06-19 06:34:07 -06:00
Nathan Sobo 388763e7cd Wait to measure characters if editor is hidden
Also, when characters *are* measured, request a display update
2014-06-19 04:19:51 -06:00
Nathan Sobo f22e4225c3 Break into separate specs for lineHeight, fontSize, and fontFamily 2014-06-19 03:35:35 -06:00
Cheng Zhao db4b99d27b Merge branch 'atom-shell-v0.13.2' 2014-06-19 15:16:06 +08:00
Nathan Sobo 17f9cc49f2 Honor the center: true option in scrollTo* methods
Fixes #2648
2014-06-18 21:48:14 -06:00
Nathan Sobo 609855af3c Decide to measure gutter's width in gutter
The gutter is in a better position to determine if the max line number
length has changed because it's a property that gets passed in so we
can compare current with previous.

Fixes #2659
2014-06-18 21:07:13 -06:00
Cheng Zhao 8410d8587b Upgrade to atom-shell@0.13.2 2014-06-19 09:38:27 +08:00
Kevin Sawicki 33c9d5ae24 Upgrade to find-and-replace@0.119 2014-06-18 18:17:01 -07:00
Kevin Sawicki 0c48821465 Upgrade to command-palette@0.23 2014-06-18 17:50:46 -07:00
Kevin Sawicki 43259f5c51 Upgrade to link@0.24 2014-06-18 17:47:42 -07:00
Kevin Sawicki fe2cb046c3 Verify token screen and buffer delta 2014-06-18 17:26:38 -07:00
Kevin Sawicki de132d79a4 Add parens for clarity 2014-06-18 17:16:50 -07:00
Kevin Sawicki 5af181ffb5 Default column to 0 2014-06-18 17:11:34 -07:00
Kevin Sawicki 355f54ba00 Test odd-numbered tab length alignment 2014-06-18 17:10:10 -07:00
Kevin Sawicki b56d4c6181 Update more expected tab lengths 2014-06-18 16:54:56 -07:00
Kevin Sawicki ad9e2ab869 Update specs where tab is now only 1 space 2014-06-18 16:48:00 -07:00
Kevin Sawicki a497b0f90f 💄 Use trailing for loop 2014-06-18 16:42:36 -07:00
Kevin Sawicki e4fd80399d Add token value directly to column 2014-06-18 16:41:10 -07:00
Kevin Sawicki c4c5d72bf1 Test multiple tab stops per line 2014-06-18 16:37:23 -07:00
Kevin Sawicki 0504244066 Test multiple tab lengths 2014-06-18 16:25:31 -07:00
Kevin Sawicki 8560526158 Add initial spec of hard tabs aligning 2014-06-18 16:24:35 -07:00
Kevin Sawicki ec8805e99e Merge branch 'master' of https://github.com/a-m-s/atom into ks-align-hard-tabs
Conflicts:
	src/tokenized-line.coffee
2014-06-18 16:09:07 -07:00
Kevin Sawicki f8ec2e6da4 Upgrade to settings-view@0.128 2014-06-18 15:23:46 -07:00
Ben Ogle 2a28eafd04 Merge pull request #2661 from atom/bo-fold-markers
Add fold markers to folded lines
2014-06-18 14:58:32 -07:00
Kevin Sawicki a6bf1af2d5 Upgrade to go-to-line@0.23 2014-06-18 14:26:40 -07:00
Kevin Sawicki 8eae66fc49 Upgrade to git-diff@0.33 2014-06-18 14:23:57 -07:00
Ben Ogle 02757fc2de 💄 2014-06-18 14:22:05 -07:00
Kevin Sawicki fc37ac37bd Upgrade to archive-view@0.33 2014-06-18 14:21:33 -07:00
Ben Ogle 63587abe97 Give fold markers a pointer on hover 2014-06-18 14:21:03 -07:00
Ben Ogle d5ea766541 Make click of fold marker unfold the row 2014-06-18 14:07:55 -07:00
Kevin Sawicki bd0643eda4 Upgrade to apm 0.69 2014-06-18 13:56:18 -07:00
Ben Ogle 7a9710b8c3 Add fold markers to folded lines
Fixes #2634
2014-06-18 13:47:38 -07:00
probablycorey 468c6598db Make sure the overlayer class is only used once.
Using it twice causes context menus with the .overlay selector to
appear twice.
Closes #2601
2014-06-18 13:24:15 -07:00
Ben Ogle ddb3cdc76f Merge pull request #2656 from atom/bo-upgrade-fnr
Upgrade find and replace to use decorations for marker views
2014-06-18 13:11:11 -07:00
Ben Ogle 1c8e716cfd Upgrade find-and-replace to use decorations for marker views 2014-06-18 12:56:05 -07:00
Nathan Sobo f1f83a7d36 Add a comment explaining the .editor-colors class on .lines 2014-06-18 12:36:40 -06:00
Nathan Sobo 8d87eb2ed6 Style the .line-numbers div to be compatible w/ both themes and the GPU
The .line-numbers div has to have an opaque background because it's
sent as a texture to the GPU, and otherwise it will have isuses with
subpixel antialiasing.

However, themes style the background of the .gutter div, which was
getting obscured by the opaque background of the line numbers. This
commit adds the .gutter class to the .line-numbers div as well and
ensures it always fills the entire height of the editor.
2014-06-18 12:36:40 -06:00
Fabian Stiewitz 87aae13c80 Prevent double slash in Atom.desktop 2014-06-18 20:28:38 +02:00
Fabian Stiewitz c735432163 Install with respect to INSTALL_PREFIX 2014-06-18 20:07:29 +02:00
Kevin Sawicki 29d26a4fae Increase timeout on Windows CI 2014-06-18 10:04:41 -07:00
Ben Ogle 5c6f711bf3 Upgrade syntax themes to add css for new find decorations 2014-06-18 09:53:17 -07:00
Nathan Sobo 53c363b853 Merge pull request #2615 from adnelson/feature/delete-to-end-of-line
added delete to end of line
2014-06-18 10:46:48 -06:00
probablycorey bacd612c71 Apply editor-colors style to gutter
Closes #2596
2014-06-18 09:42:33 -07:00
Kevin Sawicki 2cded15c4c Upgrade to language-xml@0.15 2014-06-18 09:30:44 -07:00
Corey Johnson 2e73a46cbc Merge pull request #2603 from atom/cj-expose-resizing-to-editor
Expose resizing to editor
2014-06-18 09:19:43 -07:00
Kevin Sawicki 64ae7bcdcc Upgrade to tabs@0.42 2014-06-18 08:35:08 -07:00
Kevin Sawicki abca7f778c Upgrade to status-bar@0.41 2014-06-18 08:27:10 -07:00
Kevin Sawicki b7197145c8 Upgrade to spell-check@0.38 2014-06-18 08:19:36 -07:00
Kevin Sawicki 7f53bb5753 Upgrade to text-buffer 2.4.1 2014-06-18 08:18:41 -07:00
Kevin Sawicki 8d38fc77d6 Upgrade to snippets@0.46 2014-06-18 08:15:32 -07:00
Philip Schatz 624c0bf9f1 allow multiple labels for the same command 2014-06-17 23:36:59 -04:00
Kevin Sawicki 1975882b9e Upgrade to fuzzy-finder@0.55 2014-06-17 18:16:53 -07:00
Kevin Sawicki 0bd4d31ab0 💄 Remove semicolon 2014-06-17 18:06:38 -07:00
Cheng Zhao 4192c121e5 Merge pull request #2630 from deprint/desktop-file
Install Atom.desktop when installing to /usr/local
2014-06-18 08:58:50 +08:00
Ben Ogle e89e2141d7 Merge pull request #2605 from atom/bo-ns-highlights
Add highlight decorations
2014-06-17 17:42:18 -07:00
Kevin Sawicki 25c5458bd2 Upgrade to wrap-guide@0.19 2014-06-17 17:30:58 -07:00
probablycorey ff0cddfd1d Merge remote-tracking branch 'origin/master' into cj-expose-resizing-to-editor 2014-06-17 17:22:10 -07:00
Ben Ogle a7ec7497e2 nof 2014-06-17 17:09:26 -07:00
Ben Ogle 3790cdb262 Reset highlights so they don’t interfere with styleguide text.highlight 2014-06-17 17:08:53 -07:00
Ben Ogle 4308ce7bb0 Warnings when you pass in a bs marker 2014-06-17 17:08:53 -07:00
Kevin Sawicki b302fdc553 Upgrade to markdown-preview@0.82 2014-06-17 16:41:31 -07:00
Nathan Sobo 2fffbba503 Eliminate Decoration class and use plain objects instead 2014-06-17 17:35:56 -06:00
probablycorey 9be1427891 Request scrollView measurement on resize events 2014-06-17 16:25:47 -07:00
Corey Johnson & Nathan Sobo 4564a39392 Remove measureScrollView helper 2014-06-17 16:09:23 -07:00
Corey Johnson & Nathan Sobo 068c1e6249 Use polling to detect editor resize 2014-06-17 16:07:07 -07:00
Kevin Sawicki 06a55250b9 Upgrade to bookmarks@0.25 2014-06-17 15:11:54 -07:00
Ben Ogle d8240628a7 Update doc comments 2014-06-17 14:53:11 -07:00
Kevin Sawicki eaa7593b27 Add single selection menu item 2014-06-17 14:42:57 -07:00
Kevin Sawicki 72e4be60c0 Upgrade to markdown-preview@0.81 2014-06-17 14:40:49 -07:00
Corey Johnson f3a4d32a32 Remove width setting of overflowExpander 2014-06-17 14:07:26 -07:00
Nathan Sobo edadedce7b Give highlight decorations unique id's to avoid potential React errors
Using the marker's id plus the decoration class can cause an error in
the event we apply a decoration with the same class twice to the same
marker. This is admittedly unlikely, but I think it's cleaner to just
allocate unique id's for decoration objects.
2014-06-17 15:03:45 -06:00
Nathan Sobo 89be77b0a9 💄 2014-06-17 14:47:49 -06:00
Nathan Sobo 99ba20ae0d Don't render empty highlights 2014-06-17 14:47:12 -06:00
Corey Johnson 0255e44f00 Remove suppressUpdates 2014-06-17 13:38:08 -07:00
Nathan Sobo 4832d36ac1 Rename filterDecorationsByScreenRow to getLineDecorations
Also rename local variable to lineDecorations for clarity
2014-06-17 14:35:56 -06:00
Nathan Sobo 5d15af943e Rename filterDecorationsByMarkerId to getHighlightDecorations
And rename local variable to highlightDecorations to clarify intent
2014-06-17 14:31:56 -06:00
Corey Johnson 0a671fc386 Add a div that triggers overflowchanged events on resize 2014-06-17 13:28:05 -07:00
Corey Johnson c06f5911c6 Update editor height change spec 2014-06-17 13:26:56 -07:00
Kevin Sawicki 2af8404ea9 Upgrade to bracket-matcher@0.47 2014-06-17 13:07:58 -07:00
Nathan Sobo 345d20dc4a Prepare 0.105.0 release 2014-06-17 14:05:11 -06:00
Kevin Sawicki 34b93554c3 Upgrade to tree-view@0.103 2014-06-17 11:55:53 -07:00
Kevin Sawicki 3de926a1af Hide when no deprecations 2014-06-17 11:36:07 -07:00
Kevin Sawicki bc85bd2e74 Upgrade to bracket-matcher@0.46 2014-06-17 11:34:21 -07:00
Kevin Sawicki 3601aac136 Correct deprecation label 2014-06-17 11:32:53 -07:00
Kevin Sawicki de8b498402 Add deprecations to spec runner 2014-06-17 11:28:01 -07:00
Ben Ogle ef09fbbfb2 Remove softWrap decoration option 2014-06-17 11:24:27 -07:00
Ben Ogle a3784500ec Fix editor-view tests 2014-06-17 11:13:15 -07:00
Kevin Sawicki 1bd00f1d0a Upgrade to language-c@0.18 2014-06-17 10:36:06 -07:00
Allen Nelson ef7f0ed9ed updated docstring 2014-06-17 12:18:34 -05:00
Kevin Sawicki 65e80cd65e Upgrade to symbols-view@0.56 2014-06-17 09:34:19 -07:00
Nathan Sobo 14bed8a3c8 Merge pull request #2587 from atom/bo-ns-input-handling
Handle textInput events in a way that works with autocomplete-plus
2014-06-17 10:11:34 -06:00
Kevin Sawicki d0513cb95d 📝 Doc optional param and default property value 2014-06-17 08:49:57 -07:00
Kevin Sawicki 6a08618821 Upgrade to package-generator@0.31 2014-06-17 08:29:38 -07:00
Fabian Stiewitz 72c87bfbc9 Install Atom.desktop when installDir is not temporary 2014-06-17 16:25:10 +02:00
Fabian Stiewitz 54c7c1e98d 🐧 Install Atom.desktop when installing to /usr/local 2014-06-17 12:40:10 +02:00
Kevin Sawicki 4e73fe3f24 Upgrade to settings-view@0.127 2014-06-16 17:55:13 -07:00
Ben Ogle 359793c0b0 Upgrade git-diff for use with new decoration apis. 2014-06-16 17:47:28 -07:00
Ben Ogle 34ec15862f Filter decorations in the components.
This reduces the number of intermediate objects we need to create. The 
downside is a bit more code complexity in the components.
2014-06-16 16:54:21 -07:00
Ben Ogle 04bbe393d4 Remove log lines 2014-06-16 16:51:46 -07:00
Ben Ogle 5b84aa7b18 💄 per nathan’s request 2014-06-16 16:06:18 -07:00
Ben Ogle 7ba498a170 Fix id generation 2014-06-16 16:06:01 -07:00
Ben Ogle c21f8a5a6c 💄 clean up spec names 2014-06-16 16:05:48 -07:00
Kevin Sawicki 5788e30269 Upgrade to tree-view@0.102 2014-06-16 16:02:50 -07:00
Ben Ogle 0312609e19 Make highlights render as absolute position 2014-06-16 15:57:23 -07:00
Ben Ogle 32fba97c3a Add a spec for highlights in folds 2014-06-16 15:56:55 -07:00
Ben Ogle 5259d5b750 Dont render invalid highlight decorations 2014-06-16 15:40:54 -07:00
Ben Ogle dff27eba18 Specs for highlights 2014-06-16 15:36:09 -07:00
Ben Ogle d2908c75fc Rename redundant describe 2014-06-16 15:36:09 -07:00
Nathan Sobo 2c04bff0fa Only return decorations for markers intersecting the screen row range
This relies on a fix to the interval-skip-list provided with the upgrade
to text-buffer@2.4.0.
2014-06-16 15:36:09 -07:00
Ben Ogle 4f2f158d0d Make selection updating work properly 2014-06-16 15:36:09 -07:00
Ben Ogle 351dc58354 Remove getSelectionScreenRanges() 2014-06-16 15:36:09 -07:00
Ben Ogle 2867dd98e5 Remove getGutterDecorations() 2014-06-16 15:36:09 -07:00
Ben Ogle 32a0804b9a Remove Decorations object 2014-06-16 15:36:09 -07:00
Ben Ogle 408e62a993 Pass highlightDecorations into the HighlightsComponent 2014-06-16 15:36:08 -07:00
Ben Ogle d4057d21c7 Pass the decoration hash into the gutterComponent 2014-06-16 15:36:08 -07:00
Ben Ogle 031ec9798a No more typeless decorations
Now you can specify a list of types with your decoration.
2014-06-16 15:36:08 -07:00
Ben Ogle 1ebdd801f5 Use decorations to render selections 2014-06-16 15:36:08 -07:00
Ben Ogle 084632a985 Rename Selection(s)Component to Highlight(s)Component 2014-06-16 15:36:08 -07:00
Ben Ogle 002e14990b Rename bufferRowHasClass 2014-06-16 15:36:08 -07:00
Ben Ogle 3a3fc4b614 Add a spec for screen line changes 2014-06-16 15:36:08 -07:00
Ben Ogle b028673b5d Only render on updates 2014-06-16 15:36:08 -07:00
Ben Ogle 6394814142 Make foldable decorations work again 2014-06-16 15:36:08 -07:00
Ben Ogle e128212410 Fix decoration specs to work with markers only 2014-06-16 15:36:08 -07:00
Ben Ogle 2d4360dcf0 Decorations can now only be attached to markers.
The basics work. It will render them on the gutter.
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo 120e2a3bdb Move decoration Editor specs to DisplayBuffer 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo 7142022f05 Add intersection support to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo 25520a4cad Add containedInScreenRange to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo 56da6399b8 Add startScreenRow and endScreenRow to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo a7379b067a Use ::getMarker for fold decorations instead of new DisplayBufferMarker 2014-06-16 15:36:07 -07:00
Kevin Sawicki de6fb2802b Upgrade to language-yaml@0.7 2014-06-16 15:26:10 -07:00
Kevin Sawicki 2bfd7d093a Merge pull request #2629 from atom/ks-smaller-windows-build
Smaller Windows build
2014-06-16 15:04:00 -07:00
Kevin Sawicki 416266b815 💄 Use string interpolation 2014-06-16 14:29:17 -07:00
Kevin Sawicki bcc888bfb4 💄 2014-06-16 14:15:23 -07:00
Kevin Sawicki e9bcb851c3 Escape ignored patterns 2014-06-16 14:13:43 -07:00
Allen Nelson 8411d41621 deleting only selection if selection is not empty 2014-06-16 16:13:40 -05:00
Kevin Sawicki a66f81d70a Don't include *.pdb files 2014-06-16 12:56:39 -07:00
Kevin Sawicki 72d1eb24a3 Ignore build/Release/obj directory 2014-06-16 12:53:34 -07:00
Kevin Sawicki ba18c65dac Ignore plist tests/ 2014-06-16 12:37:04 -07:00
Kevin Sawicki 0c94298ea4 Merge pull request #2627 from atom/ks-windows-package-failures-on-ci
Fix packages specs on Windows CI
2014-06-16 12:34:29 -07:00
Kevin Sawicki 9bf374d4e5 Upgrade to language-ruby@0.29 2014-06-16 12:33:27 -07:00
Nathan Sobo 9344e3fc98 Merge pull request #2626 from atom/iz-mousedown-events-on-left-click-only
Handle mousedown events only for left button in editors
2014-06-16 13:29:37 -06:00
Kevin Sawicki ede6a081a4 Upgrade to settings-view@0.126 2014-06-16 11:26:52 -07:00
Kevin Sawicki d83547b9f4 Upgrade to setings-view@0.125 2014-06-16 11:26:52 -07:00
Kevin Sawicki ef2337359b Upgrade to settings-view@0.124 2014-06-16 11:26:51 -07:00
Kevin Sawicki bc8a5f4b23 Fail on windows if specs fail 2014-06-16 11:26:51 -07:00
Kevin Sawicki 261421b609 Upgrade to settings-view@0.123 2014-06-16 11:26:51 -07:00
Kevin Sawicki 07eb2585d6 Remove fixtures cleaning 2014-06-16 11:26:51 -07:00
Kevin Sawicki bec3d4effc Delete fixtures for force re-checkout 2014-06-16 11:26:51 -07:00
Kevin Sawicki 422c4d41d1 Upgrade to settings-view@0.122 2014-06-16 11:26:51 -07:00
Kevin Sawicki 7aa233d9d6 Update markdown-preview@0.80 2014-06-16 11:26:51 -07:00
Ivan Zuzak 6c9df6d91a Handle mousedown events only for left button in editors 2014-06-16 19:57:58 +02:00
Kevin Sawicki 520e478447 Upgrade to tree-view@0.101 2014-06-16 09:56:20 -07:00
Allen Nelson fc462fcd21 added delete to end of line 2014-06-16 10:59:55 -05:00
Ivan Žužak 69b34b7377 Upgrade to language-ruby@0.28.0 2014-06-16 17:46:30 +02:00
Kevin Sawicki 3180bd2e3c Upgrade to markdown-preview@0.79 2014-06-16 08:24:51 -07:00
Ivan Žužak 286c7e8f18 Add overview to debugging guide 2014-06-15 13:27:04 +02:00
Ivan Žužak 1c6e2f06ed Mention debugging guide in contributing guide 2014-06-15 13:10:04 +02:00
Cheng Zhao 527a18fedc Upgrade to atom-shell@0.13.1 2014-06-15 12:02:13 +08:00
Kevin Sawicki 46e1a9254d Merge pull request #2609 from Bengt/patch-1
Add installation step of "C++ Toolchain" on Fedora
2014-06-14 07:41:27 -07:00
Bengt Lüers ae46f1a3e1 Add installation step of "C++ Toolchain" on Fedora 2014-06-14 16:16:22 +02:00
Philip Schatz 2fdcf7a124 remove duplicate context menu entries 2014-06-13 21:30:55 -04:00
Ben Ogle 573c7f9621 Upgrade scandal to fix replacing across devices 2014-06-13 16:29:47 -07:00
Ben Ogle dbed45c68e Upgrade temp to 0.7.0 for the tracking feature 2014-06-13 16:29:28 -07:00
Nathan Sobo 9e6756ed6d Don't perform an update in response scroll view dimension changes
We always measure the scroll view in the ::componentWillUpdate hook, so
performing *another* update in response to the measurement causes an
invariant violation in react. Whenever we are measuring, we are always
already updating.
2014-06-13 17:07:41 -06:00
Ben Ogle 95818ab21f Revert "Upgrade scandal to fix issues with renaming across devices"
This reverts commit f555af0b88.
2014-06-13 15:58:35 -07:00
Kevin Sawicki 9cf50960a2 Merge pull request #2606 from atom/ks-windows-ci
Publish builds on Windows CI
2014-06-13 15:53:08 -07:00
Ben Ogle f555af0b88 Upgrade scandal to fix issues with renaming across devices 2014-06-13 15:47:49 -07:00
Kevin Sawicki 853ee3eec5 💄 2014-06-13 15:44:43 -07:00
Kevin Sawicki bb9e052c90 DRY up zip code 2014-06-13 15:44:34 -07:00
Kevin Sawicki 4bade1c976 💄 2014-06-13 15:40:46 -07:00
Kevin Sawicki 058d55c829 Run specs on all platforms 2014-06-13 15:28:40 -07:00
Kevin Sawicki dc323348b7 Only publish janky master builds 2014-06-13 15:25:21 -07:00
Kevin Sawicki 858e7b62a3 Remove logging 2014-06-13 15:25:13 -07:00
Kevin Sawicki 28015339d9 Add some logging 2014-06-13 15:19:20 -07:00
Kevin Sawicki ca86e0258f Only log error code 2014-06-13 15:12:06 -07:00
Kevin Sawicki 87fcc39045 Add missing path segment 2014-06-13 15:11:16 -07:00
Kevin Sawicki b78ff8c3a9 Load atomcredentials on Windows 2014-06-13 15:05:36 -07:00
Kevin Sawicki 01fdf016a9 📝 Document invalid .vcxproj file error
Refs #2430
2014-06-13 14:33:16 -07:00
Kevin Sawicki 655cce9fd4 Renable asset uploading 2014-06-13 14:14:58 -07:00
Kevin Sawicki f3ea2cd9e0 Add a command 2014-06-13 12:34:00 -07:00
Kevin Sawicki ebcae85f1a Log directory 2014-06-13 12:23:49 -07:00
Kevin Sawicki 0b79c31d45 Use full path 2014-06-13 12:02:04 -07:00
Kevin Sawicki d5ec8551e1 Speed up built temporarily by not running specs 2014-06-13 11:53:30 -07:00
Kevin Sawicki cd376c2d1d Try 7za 2014-06-13 11:45:53 -07:00
probablycorey 8d84a97b2b Move scroll view measurements to componentWillUpdate 2014-06-13 11:36:40 -07:00
Kevin Sawicki 0104d7e264 Zip built app on Windows 2014-06-13 11:36:29 -07:00
Kevin Sawicki 019cccc978 Remove unused variable 2014-06-13 11:36:29 -07:00
Kevin Sawicki 7f1d88a05d Always pass windows build until flaky specs pass 2014-06-13 11:36:29 -07:00
Kevin Sawicki ec754e5cd9 Merge pull request #2602 from joliv/patch-1
Add git req to linux build instructions
2014-06-13 10:55:00 -07:00
joliv e046bb52d7 📝 Add git req to linux build instructions
Pretty simple, but doesn't come on a clean install.
2014-06-13 17:49:10 +00:00
Kevin Sawicki 34be92b5b0 Log message for all commands
The first time you bootstrap, all the build modules and apm are
installed. Previously this was showing no output so it was unclear
whether things are hung or now.

This will also help easily identify which stage of the build
npm and node-gyp errors are occurring.
2014-06-13 10:06:45 -07:00
Kevin Sawicki fb0a15b1b3 Upgrade to markdown-preview@0.78 2014-06-12 16:55:28 -07:00
Corey Johnson e96d2dbd17 Add the simplest resize fix that will work. 2014-06-12 16:17:45 -07:00
Corey Johnson 025370b9f8 Add editor component resize spec 2014-06-12 16:17:18 -07:00
Nathan Sobo e26ab5513f Don't assign scrollLeft on model on 'scroll-left-changed' events
Fixes #2513

I'm not entirely sure why, but for some reason we're getting into an
feedback cycle when the scrollLeft position changes in certain cases. In
theory, this shouldn't happen because reassigning the same value
shouldn't emit a change event. But since we're about to end-of-life the
jQuery editor, I'd like to try fixing it this way for now.
2014-06-12 17:01:12 -06:00
Kevin Sawicki f623a4f2b5 Upgrade to markdown-preview@0.77 2014-06-12 14:54:25 -07:00
Corey Johnson 4186a4943b Remove react shims deprecations 2014-06-12 14:53:09 -07:00
Ben Ogle & Nathan Sobo 4569b76dd5 Don't call preventDefault for spaces to prevent browser scrolling 2014-06-11 17:16:19 -06:00
Ben Ogle & Nathan Sobo 1c410cbf5a Handle textInput events in EditorComponent instead of on InputComponent
This commit also changes input handling to be more like it was in the
previous editor. We're using textInput rather than input events because
they are emitted *before* characters are inserted, enabling much simpler
detection of characters inserted via the accented-character menu on
OS X.

Previously I avoided this because something about it was causing reflows
in the old editor, but in this editor that doesn't seem to be a problem,
and it's actually faster.
2014-06-11 16:40:46 -06:00
Andrew Stubbs 1fe6c498ac Make hard tabs align to columns. 2014-05-14 13:31:03 +01:00
145 arquivos alterados com 5055 adições e 1965 exclusões
+1
Ver Arquivo
@@ -11,6 +11,7 @@ pairs:
bo: Ben Ogle; benogle
jr: Jason Rudolph; jasonrudolph
jl: Jessica Lord; jlord
dh: Daniel Hengeveld; danielh
email:
domain: github.com
#global: true
+3
Ver Arquivo
@@ -11,6 +11,9 @@ propose changes to this document in a pull request.
## Submitting Issues
* Check the [debugging guide](https://atom.io/docs/latest/debugging) for tips
on debugging. You might be able to find the cause of the problem and fix
things yourself.
* Include the version of Atom you are using and the OS.
* Include screenshots and animated GIFs whenever possible; they are immensely
helpful.
+16
Ver Arquivo
@@ -6,10 +6,25 @@ Visit [atom.io](https://atom.io) to learn more.
## Installing
### Mac OS X
Download the latest [Atom release](https://github.com/atom/atom/releases/latest).
Atom will automatically update when a new release is available.
### Windows
Install the [Atom chocolatey package](https://chocolatey.org/packages/Atom).
1. Install [chocolatey](https://chocolatey.org).
2. Close and reopen your command prompt or PowerShell window.
3. Run `cinst Atom`
4. In the future run `cup Atom` to upgrade to the latest release.
You can also download a `.zip` file from the [releases page](https://github.com/atom/atom/releases/latest).
The Windows version does not currently automatically update so you will need to
manually upgrade to future releases by re-downloading the `.zip` file.
## Building
* [Linux](docs/build-instructions/linux.md)
@@ -18,4 +33,5 @@ Atom will automatically update when a new release is available.
* [Windows](docs/build-instructions/windows.md)
## Developing
Check out the [guides](https://atom.io/docs/latest) and the [API reference](https://atom.io/docs/api).
+1 -1
Ver Arquivo
@@ -6,6 +6,6 @@
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "0.68.0"
"atom-package-manager": "0.91.0"
}
}
+7 -2
Ver Arquivo
@@ -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
) &
+17 -11
Ver Arquivo
@@ -39,21 +39,28 @@ module.exports = (grunt) ->
tmpDir = os.tmpdir()
appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom'
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
atomShellDownloadDir = path.join(os.tmpdir(), 'atom-cached-atom-shells')
installDir = grunt.option('install-dir')
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')
shellAppDir = path.join(buildDir, appName)
if process.platform is 'win32'
contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app')
installDir = path.join(process.env.ProgramFiles, appName)
installDir ?= path.join(process.env.ProgramFiles, appName)
killCommand = 'taskkill /F /IM atom.exe'
else if process.platform is 'darwin'
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join('/Applications', appName)
installDir ?= path.join('/Applications', appName)
killCommand = 'pkill -9 Atom'
else
contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app')
installDir = process.env.INSTALL_PREFIX ? '/usr/local'
installDir ?= process.env.INSTALL_PREFIX ? '/usr/local'
killCommand ='pkill -9 Atom'
coffeeConfig =
glob_to_multiple:
@@ -89,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: [
@@ -121,6 +130,8 @@ module.exports = (grunt) ->
atom: {appDir, appName, symbolsDir, buildDir, contentsDir, installDir, shellAppDir}
docsOutputDir: 'docs/output/api'
coffee: coffeeConfig
less: lessConfig
@@ -133,12 +144,7 @@ module.exports = (grunt) ->
coffeelint:
options:
no_empty_param_list:
level: 'error'
max_line_length:
level: 'ignore'
indentation:
level: 'ignore'
configFile: 'coffeelint.json'
src: [
'dot-atom/**/*.coffee'
'exports/**/*.coffee'
@@ -210,7 +216,7 @@ module.exports = (grunt) ->
shell:
'kill-atom':
command: 'pkill -9 Atom'
command: killCommand
options:
stdout: false
stderr: false
+7 -7
Ver Arquivo
@@ -13,11 +13,11 @@
"github-releases": "~0.2.0",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-coffeelint": "git://github.com/atom/grunt-coffeelint.git",
"grunt-contrib-csslint": "~0.1.2",
"grunt-coffeelint": "git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe",
"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",
@@ -27,15 +27,15 @@
"json-front-matter": "~0.1.3",
"legal-eagle": "~0.4.0",
"minidump": "~0.7",
"read-package-json": "1.1.8",
"normalize-package-data": "0.2.12",
"npm": "~1.4.5",
"rcedit": "~0.1.2",
"read-package-json": "1.1.8",
"request": "~2.27.0",
"rimraf": "~2.2.2",
"runas": "0.5.x",
"runas": "~1.0.1",
"underscore-plus": "1.x",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0",
"npm": "~1.4.5"
"vm-compatibility-layer": "~0.1.0"
}
}
+84 -10
Ver Arquivo
@@ -1,5 +1,6 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{cp, isAtomPackage, mkdir, rm} = require('./task-helpers')(grunt)
@@ -13,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
@@ -44,41 +45,114 @@ 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('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('npm', 'node_modules', '.bin', 'beep')
path.join('npm', 'node_modules', '.bin', 'clear')
path.join('npm', 'node_modules', '.bin', 'starwars')
path.join('pegjs', 'examples')
# Add .* to avoid matching hunspell_dictionaries.
path.join('spellchecker', 'vendor', 'hunspell', '.*')
path.join('xmldom', 'test')
path.join('jasmine-reporters', 'ext')
path.join('jasmine-node', 'node_modules', 'gaze')
path.join('jasmine-node', 'spec')
path.join('node_modules', 'nan')
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')
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('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')
'.DS_Store'
'.jshintrc'
'.npmignore'
'.pairs'
'.travis.yml'
]
ignoredPaths = ignoredPaths.map (ignoredPath) -> _.escapeRegExp(ignoredPath)
# Add .* to avoid matching hunspell_dictionaries.
ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'vendor', 'hunspell') + path.sep)}.*"
ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.*\\.pdb"
# 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)*"
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)*"
# Ignore build files
ignoredPaths.push "#{_.escapeRegExp(path.sep)}binding\\.gyp$"
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'
ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries')
ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})"
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)
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) ->
unless /.+\.plist/.test(sourcePath)
grunt.file.copy(sourcePath, path.resolve(appDir, '..', subDirectory, filename))
if process.platform is 'win32'
# Set up chocolatey ignore and gui files
fs.writeFileSync path.join(appDir, 'apm', 'node_modules', 'atom-package-manager', 'bin', 'node.exe.ignore'), ''
fs.writeFileSync path.join(appDir, 'node_modules', 'symbols-view', 'vendor', 'ctags-win32.exe.ignore'), ''
fs.writeFileSync path.join(shellAppDir, 'atom.exe.gui'), ''
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'
+15 -6
Ver Arquivo
@@ -1,12 +1,12 @@
path = require 'path'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'codesign', 'Codesign the app', ->
return unless process.platform is 'darwin'
done = @async()
if process.env.XCODE_KEYCHAIN
if process.platform is 'darwin' and process.env.XCODE_KEYCHAIN
unlockKeychain (error) ->
if error?
done(error)
@@ -22,6 +22,15 @@ module.exports = (grunt) ->
spawn {cmd, args}, (error) -> callback(error)
signApp = (callback) ->
cmd = 'codesign'
args = ['-f', '-v', '-s', 'Developer ID Application: GitHub', grunt.config.get('atom.shellAppDir')]
spawn {cmd, args}, (error) -> callback(error)
switch process.platform
when 'darwin'
cmd = 'codesign'
args = ['-f', '-v', '-s', 'Developer ID Application: GitHub', grunt.config.get('atom.shellAppDir')]
spawn {cmd, args}, (error) -> callback(error)
when 'win32'
spawn {cmd: 'taskkill', args: ['/F', '/IM', 'atom.exe']}, ->
cmd = process.env.JANKY_SIGNTOOL ? 'signtool'
args = [path.join(grunt.config.get('atom.shellAppDir'), 'atom.exe')]
spawn {cmd, args}, (error) -> callback(error)
else
callback()
+4 -2
Ver Arquivo
@@ -15,15 +15,17 @@ module.exports = (grunt) ->
grunt.registerTask 'build-docs', 'Builds the API docs in src', ->
done = @async()
docsOutputDir = grunt.config.get('docsOutputDir')
downloadIncludes (error, includePaths) ->
if error?
done(error)
else
rm('docs/output/api')
rm(docsOutputDir)
args = [
commonArgs...
'--title', 'Atom API Documentation'
'-o', 'docs/output/api'
'-o', docsOutputDir
'-r', 'docs/README.md'
'--stability', '1'
'src/'
+18
Ver Arquivo
@@ -1,5 +1,6 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
fs = require 'fs-plus'
runas = null
@@ -9,6 +10,7 @@ module.exports = (grunt) ->
grunt.registerTask 'install', 'Install the built application', ->
installDir = grunt.config.get('atom.installDir')
shellAppDir = grunt.config.get('atom.shellAppDir')
if process.platform is 'win32'
runas ?= require 'runas'
copyFolder = path.resolve 'script', 'copy-folder.cmd'
@@ -25,12 +27,28 @@ module.exports = (grunt) ->
binDir = path.join(installDir, 'bin')
shareDir = path.join(installDir, 'share', 'atom')
iconName = path.join(shareDir,'resources','app','resources','atom.png')
mkdir binDir
cp 'atom.sh', path.join(binDir, 'atom')
rm shareDir
mkdir path.dirname(shareDir)
cp shellAppDir, shareDir
# Create Atom.desktop if installation not in temporary folder
tmpDir = if process.env.TMPDIR? then process.env.TMPDIR else '/tmp'
if installDir.indexOf(tmpDir) isnt 0
desktopFile = path.join('resources', 'linux', 'Atom.desktop.in')
desktopInstallFile = path.join(installDir, 'share', 'applications', 'Atom.desktop')
{description} = grunt.file.readJSON('package.json')
iconName = path.join(shareDir, 'resources', 'app', 'resources', 'atom.png')
installDir = path.join(installDir, '.') # To prevent "Exec=/usr/local//share/atom/atom"
template = _.template(String(fs.readFileSync(desktopFile)))
filled = template({description, installDir, iconName})
grunt.file.write(desktopInstallFile, filled)
# Create relative symbol link for apm.
process.chdir(binDir)
rm('apm')
+14 -11
Ver Arquivo
@@ -2,14 +2,17 @@ fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
fillTemplate = (filePath, data) ->
template = _.template(String(fs.readFileSync(filePath + '.in')))
filled = template(data)
fs.writeFileSync(filePath, filled)
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
fillTemplate = (filePath, data) ->
template = _.template(String(fs.readFileSync("#{filePath}.in")))
filled = template(data)
outputPath = path.join(grunt.config.get('atom.buildDir'), path.basename(filePath))
grunt.file.write(outputPath, filled)
outputPath
grunt.registerTask 'mkdeb', 'Create debian package', ->
done = @async()
@@ -23,15 +26,15 @@ module.exports = (grunt) ->
{name, version, description} = grunt.file.readJSON('package.json')
section = 'devel'
maintainer = 'GitHub <atom@github.com>'
data = {name, version, description, section, arch, maintainer}
installDir = '/usr'
iconName = 'atom'
data = {name, version, description, section, arch, maintainer, installDir, iconName}
control = path.join('resources', 'linux', 'debian', 'control')
fillTemplate(control, data)
desktop = path.join('resources', 'linux', 'Atom.desktop')
fillTemplate(desktop, data)
controlFilePath = fillTemplate(path.join('resources', 'linux', 'debian', 'control'), data)
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'Atom.desktop'), data)
icon = path.join('resources', 'atom.png')
buildDir = grunt.config.get('atom.buildDir')
cmd = path.join('script', 'mkdeb')
args = [version, arch, control, desktop, icon, buildDir]
args = [version, arch, controlFilePath, desktopFilePath, icon, buildDir]
spawn({cmd, args}, done)
+21
Ver Arquivo
@@ -0,0 +1,21 @@
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) ->
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]}"
+18
Ver Arquivo
@@ -0,0 +1,18 @@
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-long-paths', 'Log long paths in the built application', ->
shellAppDir = grunt.config.get('atom.shellAppDir')
longPaths = []
grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) ->
if relativePath
fullPath = path.join(relativePath, fileName)
else
fullPath = fileName
longPaths.push(fullPath) if fullPath.length >= 200
longPaths.sort (longPath1, longPath2) -> longPath2.length - longPath1.length
longPaths.forEach (longPath) ->
grunt.log.error "#{longPath.length} character path: #{longPath}"
+2
Ver Arquivo
@@ -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')
+33 -15
Ver Arquivo
@@ -8,11 +8,7 @@ GitHub = require 'github-releases'
request = require 'request'
grunt = null
maxReleases = 10
assets = [
{assetName: 'atom-mac.zip', sourceName: 'Atom.app'}
{assetName: 'atom-mac-symbols.zip', sourceName: 'Atom.breakpad.syms'}
]
commitSha = process.env.JANKY_SHA1
token = process.env.ATOM_ACCESS_TOKEN
defaultHeaders =
@@ -23,13 +19,20 @@ module.exports = (gruntObject) ->
grunt = gruntObject
grunt.registerTask 'publish-build', 'Publish the built app', ->
return unless process.platform is 'darwin'
return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'master'
tasks = ['upload-assets']
tasks.unshift('build-docs', 'prepare-docs') if process.platform is 'darwin'
grunt.task.run(tasks)
grunt.registerTask 'prepare-docs', 'Move the build docs to the build dir', ->
fs.copySync(grunt.config.get('docsOutputDir'), path.join(grunt.config.get('atom.buildDir'), 'atom-docs'))
grunt.registerTask 'upload-assets', 'Upload the assets to a GitHub release', ->
done = @async()
buildDir = grunt.config.get('atom.buildDir')
assets = getAssets()
zipApps buildDir, assets, (error) ->
zipAssets buildDir, assets, (error) ->
return done(error) if error?
getAtomDraftRelease (error, release) ->
return done(error) if error?
@@ -38,23 +41,38 @@ module.exports = (gruntObject) ->
return done(error) if error?
uploadAssets(release, buildDir, assets, done)
getAssets = ->
if process.platform is 'darwin'
[
{assetName: 'atom-mac.zip', sourcePath: 'Atom.app'}
{assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'}
{assetName: 'atom-docs.zip', sourcePath: 'atom-docs'}
]
else
[
{assetName: 'atom-windows.zip', sourcePath: 'Atom'}
]
logError = (message, error, details) ->
grunt.log.error(message)
grunt.log.error(error.message ? error) if error?
grunt.log.error(details) if details
zipApps = (buildDir, assets, callback) ->
zip = (directory, sourceName, assetName, callback) ->
zipAssets = (buildDir, assets, callback) ->
zip = (directory, sourcePath, assetName, callback) ->
if process.platform is 'win32'
zipCommand = "C:/psmodules/7z.exe a -r #{assetName} #{sourcePath}"
else
zipCommand = "zip -r --symlinks #{assetName} #{sourcePath}"
options = {cwd: directory, maxBuffer: Infinity}
child_process.exec "zip -r --symlinks #{assetName} #{sourceName}", options, (error, stdout, stderr) ->
if error?
logError("Zipping #{sourceName} failed", error, stderr)
child_process.exec zipCommand, options, (error, stdout, stderr) ->
logError("Zipping #{sourcePath} failed", error, stderr) if error?
callback(error)
tasks = []
for {assetName, sourceName} in assets
for {assetName, sourcePath} in assets
fs.removeSync(path.join(buildDir, assetName))
tasks.push(zip.bind(this, buildDir, sourceName, assetName))
tasks.push(zip.bind(this, buildDir, sourcePath, assetName))
async.parallel(tasks, callback)
getAtomDraftRelease = (callback) ->
@@ -119,7 +137,7 @@ uploadAssets = (release, buildDir, assets, callback) ->
fs.createReadStream(assetPath).pipe(assetRequest)
tasks = []
for {assetName, sourceName} in assets
for {assetName} in assets
assetPath = path.join(buildDir, assetName)
tasks.push(upload.bind(this, release, assetName, assetPath))
async.parallel(tasks, callback)
+2 -2
Ver Arquivo
@@ -45,8 +45,8 @@ module.exports = (grunt) ->
strings =
CompanyName: 'GitHub, Inc.'
FileDescription: 'The hackable editor'
LegalCopyright: 'Copyright (C) 2013 GitHub, Inc. All rights reserved'
FileDescription: 'Atom'
LegalCopyright: 'Copyright (C) 2014 GitHub, Inc. All rights reserved'
ProductName: 'Atom'
ProductVersion: version
+7 -4
Ver Arquivo
@@ -53,9 +53,7 @@ module.exports = (grunt) ->
continue unless isAtomPackage(packagePath)
packageSpecQueue.push(packagePath)
# TODO: Restore concurrency on Windows
packageSpecQueue.concurrency = 1 unless process.platform is 'win32'
packageSpecQueue.concurrency = 1
packageSpecQueue.drain = -> callback(null, failedPackages)
runCoreSpecs = (callback) ->
@@ -105,4 +103,9 @@ module.exports = (grunt) ->
failures.push "atom core" if coreSpecFailed
grunt.log.error("[Error]".red + " #{failures.join(', ')} spec(s) failed") if failures.length > 0
done(!coreSpecFailed and failedPackages.length == 0)
if process.platform is 'win32' and process.env.JANKY_SHA1
# Package specs are still flaky on Windows CI
done(!coreSpecFailed)
else
done(!coreSpecFailed and failedPackages.length == 0)
+1 -1
Ver Arquivo
@@ -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()
+14
Ver Arquivo
@@ -0,0 +1,14 @@
{
"indentation": {
"level": "ignore"
},
"max_line_length": {
"level": "ignore"
},
"no_empty_param_list": {
"level": "error"
},
"no_unnecessary_fat_arrows": {
"level": "ignore"
}
}
+12 -22
Ver Arquivo
@@ -11,41 +11,31 @@ value of a namespaced config key with `atom.config.get`:
@showInvisibles() if atom.config.get "editor.showInvisibles"
```
Or you can use the `::observeConfig` to track changes from any view object.
Or you can use the `::subscribe` with `atom.config.observe` to track changes
from any view object.
```coffeescript
class MyView extends View
initialize: ->
@observeConfig 'editor.fontSize', () =>
@subscribe atom.config.observe 'editor.fontSize', (newValue, {previous}) =>
@adjustFontSize()
```
The `::observeConfig` method will call the given callback immediately with the
current value for the specified key path, and it will also call it in the future
whenever the value of that key path changes.
The `atom.config.observe` method will call the given callback immediately with
the current value for the specified key path, and it will also call it in the
future whenever the value of that key path changes.
Subscriptions made with `observeConfig` are automatically canceled when the
Subscriptions made with `::subscribe` are automatically canceled when the
view is removed. You can cancel config subscriptions manually via the
`unobserveConfig` method.
`off` method on the subscription object that `atom.config.observe` returns.
```coffeescript
view1.unobserveConfig() # unobserve all properties
```
fontSizeSubscription = atom.config.observe 'editor.fontSize', (newValue, {previous}) =>
@adjustFontSize()
You can add the ability to observe config values to non-view classes by
extending their prototype with the `ConfigObserver` mixin:
# ... later on
```coffeescript
{ConfigObserver} = require 'atom'
class MyClass
ConfigObserver.includeInto(this)
constructor: ->
@observeConfig 'editor.showInvisibles', -> # ...
destroy: ->
@unobserveConfig()
fontSizeSubscription.off() # Stop observing
```
### Writing Config Settings
+65 -10
Ver Arquivo
@@ -1,4 +1,4 @@
## Atom.io package and update API
# Atom.io package and update API
This guide describes the web API used by [apm](https://github.com/atom/apm) and
Atom. The vast majority of use cases are met by the `apm` command-line tool,
@@ -8,6 +8,8 @@ and making sure you have pushed your git tag. In fact, Atom itself shells out to
uses `apm`, see the [PackageManager class](https://github.com/atom/settings-view/blob/master/lib/package-manager.coffee)
in the `settings-view` package.
*This API should be considered pre-release and is subject to change (though significant breaking changes are unlikely).*
### Authorization
For calls to the API that require authentication, provide a valid token from your
@@ -17,12 +19,18 @@ For calls to the API that require authentication, provide a valid token from you
All requests that take parameters require `application/json`.
## Resources
# API Resources
### Packages
## Packages
### Listing packages
#### GET /api/packages
Parameters:
- **page** (optional)
Returns a list of all packages in the following format:
```json
[
@@ -40,6 +48,17 @@ 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: <https://www.atom.io/api/packages?page=1>; rel="self",
<https://www.atom.io/api/packages?page=41>; rel="last",
<https://www.atom.io/api/packages?page=2>; rel="next"
```
### Showing package details
#### GET /api/packages/:package_name
Returns package details and versions for a single package
@@ -68,6 +87,8 @@ Returns:
}
```
### Creating a package
#### POST /api/packages
Create a new package; requires authentication.
@@ -92,6 +113,7 @@ Returns:
- The package.json at owner/repo isn't valid
- **409** - A package by that name already exists
### Deleting a package
#### DELETE /api/packages/:package_name
@@ -103,6 +125,13 @@ Returns:
- **400** - Repository is inaccessible
- **401** - Unauthorized
### Renaming a package
Packages are renamed by publishing a new version with the name changed in `package.json`
See [Creating a new package version](#creating-a-new-package-version) for details.
Requests made to the previous name will forward to the new name.
### Package Versions
#### GET /api/packages/:package_name/versions/:version_name
@@ -144,7 +173,9 @@ Returns `package.json` with `dist` key added for e.g. tarball download:
#### POST /api/packages/:package_name/versions
Creates a new package version from a git tag; requires authentication.
Creates a new package version from a git tag; requires authentication. If `rename`
is not `true`, the `name` field in `package.json` *must* match the current package
name.
#### Parameters
@@ -152,14 +183,15 @@ Creates a new package version from a git tag; requires authentication.
that the version name will not be taken from the tag, but from the `version`
key in the `package.json` file at that ref. The authenticating user *must* have
access to the package repository.
- **rename** - Boolean indicating whether this version contains a new name for the package.
#### Returns
- **201** - Successfully created. Returns created version.
- **400** - Git tag not found / Repository inaccessible
- **400** - Git tag not found / Repository inaccessible / package.json invalid
- **409** - Version exists
### Delete a version
### Deleting a version
#### DELETE /api/packages/:package_name/versions/:version_name
@@ -172,7 +204,9 @@ you'll need to increment the version when republishing.
Returns 204 No Content
### Stars
## Stars
### Listing user stars
#### GET /api/users/:login/stars
@@ -186,19 +220,40 @@ List the authenticated user's starred packages; requires authentication.
Return value is similar to **GET /api/packages**
### Starring a package
#### POST /api/packages/:name/star
Star a package; requires authentication.
Returns a package.
### Unstarring a package
#### DELETE /api/packages/:name/star
Unstar a package; requires authentication.
Returns 204 No Content.
### Atom updates
### Listing a package's stargazers
#### GET /api/packages/:name/stargazers
List the users that have starred a package.
Returns a list of user objects:
```json
[
{"login":"aperson"},
{"login":"anotherperson"},
]
```
## Atom updates
### Listing Atom updates
#### GET /api/updates
@@ -206,10 +261,10 @@ Atom update feed, following the format expected by [Squirrel](https://github.com
Returns:
```
```json
{
"name": "0.96.0",
"notes": "[HTML release notes]"
"notes": "[HTML release notes]",
"pub_date": "2014-05-19T15:52:06.000Z",
"url": "https://www.atom.io/api/updates/download"
}
+65 -22
Ver Arquivo
@@ -6,34 +6,70 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
* OS with 64-bit or 32-bit architecture
* C++ toolchain
* on Ubuntu/Debian: `sudo apt-get install build-essential`
* [node.js](http://nodejs.org/download/) v0.10.x
* [Ubuntu/Debian/Mint instructions](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os)
* [Fedora instructions](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#fedora)
* [npm](http://www.npmjs.org/) v1.4.x
* `npm` comes with node.js so no explicit installation is needed here.
* You can check `npm` 1.4 or above is installed by running `npm -v`.
* libgnome-keyring-dev
* on Ubuntu/Debian: `sudo apt-get install libgnome-keyring-dev`
* on Fedora: `sudo yum --assumeyes install libgnome-keyring-devel`
* on other distributions refer to the manual on how to install packages
* `npm config set python /usr/bin/python2 -g` to ensure that gyp uses Python 2
* This command may require `sudo` depending on how you have
[configured npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os).
* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/download/) v0.10.x
* [npm](http://www.npmjs.org/) v1.4.x (bundled with Node.js)
* `npm -v` to check the version.
* `npm config set python /usr/bin/python2 -g` to ensure that gyp uses python2.
* You might need to run this command as `sudo`, depending on how you have set up [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os).
* development headers for [GNOME Keyring](https://wiki.gnome.org/Projects/GnomeKeyring)
### Ubuntu / Debian
* `sudo apt-get install build-essential git libgnome-keyring-dev`
* Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os).
### Fedora
* `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel`
* Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#fedora).
### Arch
* `sudo pacman -S base-devel git nodejs libgnome-keyring`
* `export PYTHON=/usr/bin/python2` before building Atom.
## Instructions
```sh
git clone https://github.com/atom/atom
cd atom
script/build # Creates application at $TMPDIR/atom-build/Atom
sudo script/grunt install # Installs command to /usr/local/bin/atom
script/grunt mkdeb # Generates a .deb package at $TMPDIR/atom-build
```
If you have problems with permissions don't forget to prefix with `sudo`
From the cloned repository directory:
1. Build:
```sh
$ script/build
```
This will create the atom application at `$TMPDIR/atom-build/Atom`.
2. Install the `atom` and `apm` commands to `/usr/local/bin` by executing:
```sh
$ sudo script/grunt install
```
3. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`:
```sh
$ script/grunt mkdeb
```
Use the newly installed atom by restarting any running atom instances.
## Advanced Options
### Custom install directory
```sh
sudo script/grunt install --install-dir /install/atom/here
```
### Custom build directory
```sh
script/build --build-dir /build/atom/here
```
## Troubleshooting
### Exception: "TypeError: Unable to watch path"
If you get following error with a big traceback right after Atom starts:
@@ -57,6 +93,13 @@ and restart Atom. If Atom now works fine, you can make this setting permanent:
See also https://github.com/atom/atom/issues/2082.
### /usr/bin/env: node: No such file or directory
If you get this notice when attempting to `script/build`, you either do not
have Node.js installed, or node isn't identified as Node.js on your machine.
If it's the latter, entering `sudo ln -s /usr/bin/nodejs /usr/bin/node` into
your terminal may fix the issue.
### Linux build error reports in atom/atom
* Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Alinux&type=Issues)
to get a list of reports about build errors on Linux.
+41 -7
Ver Arquivo
@@ -9,8 +9,11 @@
* For 64-bit builds of node and native modules you **must** have the
[Windows 7 64-bit SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279).
You may also need the [compiler update for the Windows SDK 7.1](http://www.microsoft.com/en-us/download/details.aspx?id=4422)
* [Python](http://www.python.org/download/) v2.7.x
* [Python](http://www.python.org/download/) v2.7.
* The python.exe must be available at `%SystemDrive%\Python27\python.exe`.
If it is installed elsewhere, you can create a symbolic link to the
directory containing the python.exe using:
`mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`
* [GitHub for Windows](http://windows.github.com/)
### On Windows 8
@@ -32,10 +35,14 @@
## Why do I have to use GitHub for Windows?
You don't, You can use your existing Git! GitHub for Windows's Git Shell is just
easier to set up. You need to have Posix tools in your `%PATH%` (i.e. `grep`,
`sed`, et al.), which isn't the default configuration when you install Git. To
fix this, you probably need to fiddle with your system PATH.
You don't. You can use your existing Git! GitHub for Windows's Git Shell is just
easier to set up.
If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your powershell or command window.
Note that you may have to open your command window as administrator. For powershell that doesn't seem to always be the case, though.
If none of this works, do install Github for Windows and use its Git shell. Makes life easier.
## Troubleshooting
@@ -51,5 +58,32 @@ fix this, you probably need to fiddle with your system PATH.
* Try moving the repository to `C:\atom`. Most likely, the path is too long.
See [issue #2200](https://github.com/atom/atom/issues/2200).
* `error MSB4025: The project file could not be loaded. Invalid character in the given encoding.`
* These can occur because your home directory (`%USERPROFILE%`) has non-ASCII
characters in it. This is a bug in [gyp](https://code.google.com/p/gyp/)
which is used to build native node modules and there is no known workaround.
* https://github.com/TooTallNate/node-gyp/issues/297
* https://code.google.com/p/gyp/issues/detail?id=393
* `script/build` stops at installing runas with 'Failed at the runas@0.5.4 install script.'
See the next item.
* `error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.`
* If you're building atom with Visual Studio 2013 try executing the following
command in your Git shell and then re-run `script/build`:
```
$env:GYP_MSVS_VERSION=2013
```
* Other `node-gyp` errors on first build attempt, even though the right node and python versions are installed.
* Do try the build command one more time, as experience shows it often works on second try in many of these cases.
### Windows build error reports in atom/atom
* Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows.
* If all fails, use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows, and see if yours has already been reported.
* If it hasn't, please open a new issue with your Windows version 32/64bit and a print/screenshot of your build output, incl. the node and python versions.
+3 -2
Ver Arquivo
@@ -227,15 +227,16 @@ or one of its parents has the `tree-view` class applied to it.
You can also add separators and submenus to your context menus. To add a
submenu, pass in another object instead of a command. To add a separator, use
`-` for the name and command of the item.
`-` for the command of the item.
```coffeescript
'context-menu':
'.workspace':
'Inspect Element': 'core:inspect'
'-': '-'
'Separator': '-'
'Text':
'Select All': 'core:select-all'
'Another Separator': '-'
'Deleted Selected Text': 'core:delete'
```
+1 -1
Ver Arquivo
@@ -169,7 +169,7 @@ For example, to change the color of the cursor, you could add the following
rule to your _~/.atom/styles.less_ file:
```less
.editor .cursor {
.editor.is-focused .cursor {
border-color: pink;
}
```
+8 -1
Ver Arquivo
@@ -1,6 +1,13 @@
# Debugging
Atom provides several tools to help you understand unexpected behavior and debug problems. This guide describes some of those tools and a few approaches to help you debug and provide more helpful information when [submitting issues].
Atom provides several tools to help you understand unexpected behavior and debug problems. This guide describes some of those tools and a few approaches to help you debug and provide more helpful information when [submitting issues]:
* [Update to the latest version](#update-to-the-latest-version)
* [Check Atom and package settings](#check-atom-and-package-settings)
* [Check the keybindings](#check-the-keybindings)
* [Check if the problem shows up in safe mode](#check-if-the-problem-shows-up-in-safe-mode)
* [Check your config files](#check-your-config-files)
* [Check for errors in the developer tools](#check-for-errors-in-the-developer-tools)
## Update to the latest version
+69 -1
Ver Arquivo
@@ -38,7 +38,7 @@ Atom uses [Jasmine](http://jasmine.github.io/2.0/introduction.html) as its spec
0. Add one or more expectations
The best way to learn about expectations is to read the [jasmine documentation](http://jasmine.github.io/2.0/introduction.html#section-Expectations) about them. Below is a simple example.
The best way to learn about expectations is to read the [jasmine documentation](http://jasmine.github.io/1.3/introduction.html#section-Expectations) about them. Below is a simple example.
```coffee
describe "when a test is written", ->
@@ -47,6 +47,74 @@ Atom uses [Jasmine](http://jasmine.github.io/2.0/introduction.html) as its spec
expect("oranges").not.toEqual("apples")
```
## Asynchronous specs
Writing Asynchronous specs can be tricky at first. Some examples.
0. Promises
Working with promises is rather easy in Atom. You can use our `waitsForPromise` function.
```coffee
describe "when we open a file", ->
it "should be opened in an editor", ->
waitsForPromise ->
atom.workspace.open('c.coffee').then (editor) ->
expect(editor.getPath()).toContain 'c.coffee'
```
This method can be used in the `describe`, `it`, `beforeEach` and `afterEach` functions.
```coffee
describe "when we open a file", ->
beforeEach ->
waitsForPromise ->
atom.workspace.open 'c.coffee'
it "should be opened in an editor", ->
expect(atom.workspace.getActiveEditor().getPath()).toContain 'c.coffee'
```
If you need to wait for multiple promises use a new `waitsForPromise` function for each promise. (Caution: Without `beforeEach` this example will fail!)
```coffee
describe "waiting for the packages to load", ->
beforeEach ->
waitsForPromise ->
atom.workspace.open('sample.js')
waitsForPromise ->
atom.packages.activatePackage('tabs')
waitsForPromise ->
atom.packages.activatePackage('tree-view')
it 'should have waited long enough', ->
expect(atom.packages.isPackageActive('tabs')).toBe true
expect(atom.packages.isPackageActive('tree-view')).toBe true
```
0. Asynchronous functions with callbacks
Specs for asynchronous functions can be done using the `waitsFor` and `runs` functions. A simple example.
```coffee
describe "fs.readdir(path, cb)", ->
it "is async", ->
spy = jasmine.createSpy('fs.readdirSpy')
fs.readdir('/tmp/example', spy)
waitsFor ->
spy.callCount > 0
runs ->
exp = [null, ['example.coffee']]
expect(spy.mostRecentCall.args).toEqual exp
expect(spy).toHaveBeenCalledWith(null, ['example.coffee'])
```
For a more detailed documentation on asynchronous tests please visit the [jasmine documentation](http://jasmine.github.io/1.3/introduction.html#section-Asynchronous_Support).
## Running specs
Most of the time you'll want to run specs by triggering the `window:run-package-specs` command. This command is not only to run package specs, it is also for Atom core specs. This will run all the specs in the current project's spec directory. If you want to run the Atom core specs and **all** the default package specs trigger the `window:run-all-specs` command.
+6 -1
Ver Arquivo
@@ -15,10 +15,15 @@ unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
module.exports.$ = $
module.exports.$$ = $$
module.exports.$$$ = $$$
module.exports.EditorView = require '../src/editor-view'
if atom.config.get('core.useReactMiniEditors')
module.exports.EditorView = require '../src/react-editor-view'
else
module.exports.EditorView = require '../src/editor-view'
module.exports.ScrollView = require '../src/scroll-view'
module.exports.SelectListView = require '../src/select-list-view'
module.exports.Task = require '../src/task'
module.exports.View = View
module.exports.WorkspaceView = require '../src/workspace-view'
module.exports.Workspace = require '../src/workspace'
module.exports.React = require 'react-atom-fork'
module.exports.Reactionary = require 'reactionary-atom-fork'
-2
Ver Arquivo
@@ -12,7 +12,6 @@
# Sublime Parity
'tab': 'editor:indent'
'enter': 'editor:newline'
'num-enter': 'editor:newline'
'shift-tab': 'editor:outdent-selected-rows'
'ctrl-K': 'editor:delete-line'
@@ -27,7 +26,6 @@
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'enter': 'native!'
'num-enter': 'native!'
'backspace': 'native!'
'shift-backspace': 'native!'
'delete': 'native!'
+4 -1
Ver Arquivo
@@ -21,7 +21,6 @@
'cmd-O': 'application:open-dev'
'cmd-alt-ctrl-s': 'application:run-all-specs'
'enter': 'core:confirm'
'num-enter': 'core:confirm'
'escape': 'core:cancel'
'up': 'core:move-up'
'down': 'core:move-down'
@@ -53,6 +52,8 @@
'shift-down': 'core:select-down'
'shift-left': 'core:select-left'
'shift-right': 'core:select-right'
'shift-pageup': 'core:select-page-up'
'shift-pagedown': 'core:select-page-down'
'delete': 'core:delete'
'shift-delete': 'core:delete'
'pageup': 'core:page-up'
@@ -67,6 +68,8 @@
'cmd-}': 'pane:show-next-item'
'cmd-alt-left': 'pane:show-previous-item'
'cmd-alt-right': 'pane:show-next-item'
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab': 'pane:show-previous-item'
'cmd-=': 'window:increase-font-size'
+7 -2
Ver Arquivo
@@ -1,7 +1,6 @@
'body':
# Atom Specific
'enter': 'core:confirm'
'num-enter': 'core:confirm'
'escape': 'core:cancel'
'up': 'core:move-up'
'down': 'core:move-down'
@@ -26,6 +25,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'
@@ -35,14 +35,18 @@
'shift-down': 'core:select-down'
'shift-left': 'core:select-left'
'shift-right': 'core:select-right'
'shift-pageup': 'core:select-page-up'
'shift-pagedown': 'core:select-page-down'
'delete': 'core:delete'
'shift-delete': 'core:delete'
'shift-delete': 'core:cut'
'pageup': 'core:page-up'
'pagedown': 'core:page-down'
'backspace': 'core:backspace'
'shift-backspace': 'core:backspace'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'
'ctrl-shift-up': 'core:move-up'
'ctrl-shift-down': 'core:move-down'
'ctrl-=': 'window:increase-font-size'
@@ -91,6 +95,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
+11 -2
Ver Arquivo
@@ -5,7 +5,6 @@
# Atom Specific
'enter': 'core:confirm'
'num-enter': 'core:confirm'
'escape': 'core:cancel'
'up': 'core:move-up'
'down': 'core:move-down'
@@ -18,6 +17,7 @@
'F11': 'window:toggle-full-screen'
# Sublime Parity
'ctrl-,': 'application:show-settings'
'ctrl-N': 'application:new-window'
'ctrl-W': 'window:close'
'ctrl-o': 'application:open-file'
@@ -26,7 +26,9 @@
'ctrl-s': 'core:save'
'ctrl-S': 'core:save-as'
'ctrl-w': 'core:close'
'ctrl-f4': 'core:close'
'ctrl-z': 'core:undo'
'ctrl-shift-z': 'core:redo'
'ctrl-y': 'core:redo'
'ctrl-x': 'core:cut'
'ctrl-c': 'core:copy'
@@ -37,14 +39,18 @@
'shift-down': 'core:select-down'
'shift-left': 'core:select-left'
'shift-right': 'core:select-right'
'shift-pageup': 'core:select-page-up'
'shift-pagedown': 'core:select-page-down'
'delete': 'core:delete'
'shift-delete': 'core:delete'
'shift-delete': 'core:cut'
'pageup': 'core:page-up'
'pagedown': 'core:page-down'
'backspace': 'core:backspace'
'shift-backspace': 'core:backspace'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-pageup': 'pane:show-previous-item'
'ctrl-pagedown': 'pane:show-next-item'
'ctrl-shift-up': 'core:move-up'
'ctrl-shift-down': 'core:move-down'
'ctrl-alt-up': 'editor:add-selection-above'
@@ -78,12 +84,15 @@
'ctrl-delete': 'editor:delete-to-end-of-word'
'ctrl-home': 'core:move-to-top'
'ctrl-end': 'core:move-to-bottom'
'ctrl-shift-home': 'core:select-to-top'
'ctrl-shift-end': 'core:select-to-bottom'
# Sublime Parity
'ctrl-a': 'core:select-all'
'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
+2 -1
Ver Arquivo
@@ -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' }
]
@@ -109,6 +109,7 @@
submenu: [
{ label: 'Add Selection Above', command: 'editor:add-selection-above' }
{ label: 'Add Selection Below', command: 'editor:add-selection-below' }
{ label: 'Single Selection', command: 'editor:consolidate-selections'}
{ label: 'Split into Lines', command: 'editor:split-selections-into-lines'}
{ type: 'separator' }
{ label: 'Select to Top', command: 'core:select-to-top' }
+3 -2
Ver Arquivo
@@ -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' }
@@ -108,6 +108,7 @@
{ label: 'Add Selection &Above', command: 'editor:add-selection-above' }
{ label: 'Add Selection &Below', command: 'editor:add-selection-below' }
{ label: 'S&plit into Lines', command: 'editor:split-selections-into-lines'}
{ label: 'Single Selection', command: 'editor:consolidate-selections'}
{ type: 'separator' }
{ label: 'Select to &Top', command: 'core:select-to-top' }
{ label: 'Select to Botto&m', command: 'core:select-to-bottom' }
+8 -2
Ver Arquivo
@@ -9,13 +9,18 @@
{ 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' }
{ 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' }
@@ -127,6 +132,7 @@
{ label: 'Add Selection &Above', command: 'editor:add-selection-above' }
{ label: 'Add Selection &Below', command: 'editor:add-selection-below' }
{ label: 'S&plit into Lines', command: 'editor:split-selections-into-lines'}
{ label: 'Single Selection', command: 'editor:consolidate-selections'}
{ type: 'separator' }
{ label: 'Select to &Top', command: 'core:select-to-top' }
{ label: 'Select to Botto&m', command: 'core:select-to-bottom' }
+78 -75
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.104.0",
"version": "0.122.0",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/browser/main.js",
"repository": {
@@ -17,125 +17,128 @@
"url": "http://github.com/atom/atom/raw/master/LICENSE.md"
}
],
"atomShellVersion": "0.13.0",
"atomShellVersion": "0.15.6",
"dependencies": {
"async": "0.2.6",
"atom-keymap": "^0.27.0",
"atom-keymap": "^2.0.1",
"bootstrap": "git+https://github.com/atom/bootstrap.git#6af81906189f1747fd6c93479e3d998ebe041372",
"clear-cut": "0.4.0",
"coffee-script": "1.7.0",
"coffeestack": "0.7.0",
"delegato": "^1",
"emissary": "^1.2.1",
"first-mate": "^1.7",
"fs-plus": "^2.2.3",
"emissary": "^1.2.2",
"first-mate": "^2.0.1",
"fs-plus": "^2.2.6",
"fstream": "0.1.24",
"fuzzaldrin": "^1.1",
"git-utils": "^1.3",
"grim": "0.11.0",
"git-utils": "^2.1.4",
"grim": "0.12.0",
"guid": "0.0.10",
"jasmine-tagged": "^1.1.2",
"less-cache": "0.12.0",
"less-cache": "0.13.0",
"mixto": "^1",
"mkdirp": "0.3.5",
"nslog": "0.5.0",
"oniguruma": "^1.0.6",
"nslog": "^1.0.1",
"oniguruma": "^3.0.3",
"optimist": "0.4.0",
"pathwatcher": "^1.3.2",
"pathwatcher": "^2.0.6",
"property-accessors": "^1",
"q": "^1.0.1",
"random-words": "0.0.1",
"react-atom-fork": "^0.10.0",
"reactionary-atom-fork": "^0.9.0",
"runas": "^0.5",
"scandal": "0.15.2",
"react-atom-fork": "^0.11.1",
"reactionary-atom-fork": "^1.0.0",
"runas": "1.0.1",
"scandal": "1.0.0",
"scoped-property-store": "^0.9.0",
"scrollbar-style": "^0.4.0",
"scrollbar-style": "^1.0.2",
"season": "^1.0.2",
"semver": "1.1.4",
"serializable": "^1",
"space-pen": "3.2.0",
"temp": "0.5.0",
"text-buffer": "^2.3.0",
"temp": "0.7.0",
"text-buffer": "^3.0.1",
"theorist": "^1",
"underscore-plus": "^1.4.1",
"underscore-plus": "^1.5.1",
"vm-compatibility-layer": "0.1.0"
},
"packageDependencies": {
"atom-dark-syntax": "0.16.0",
"atom-dark-ui": "0.29.0",
"atom-light-syntax": "0.17.0",
"atom-light-ui": "0.25.0",
"base16-tomorrow-dark-theme": "0.16.0",
"solarized-dark-syntax": "0.17.0",
"solarized-light-syntax": "0.8.0",
"archive-view": "0.32.0",
"autocomplete": "0.28.0",
"atom-dark-syntax": "0.19.0",
"atom-dark-ui": "0.33.0",
"atom-light-syntax": "0.20.0",
"atom-light-ui": "0.29.0",
"base16-tomorrow-dark-theme": "0.21.0",
"base16-tomorrow-light-theme": "0.4.0",
"solarized-dark-syntax": "0.22.0",
"solarized-light-syntax": "0.12.0",
"archive-view": "0.36.0",
"autocomplete": "0.31.0",
"autoflow": "0.17.0",
"autosave": "0.14.0",
"background-tips": "0.14.0",
"bookmarks": "0.24.0",
"bracket-matcher": "0.45.0",
"command-palette": "0.22.0",
"deprecation-cop": "0.7.0",
"dev-live-reload": "0.31.0",
"exception-reporting": "0.18.0",
"autosave": "0.15.0",
"background-tips": "0.15.0",
"bookmarks": "0.27.0",
"bracket-matcher": "0.54.0",
"command-palette": "0.24.0",
"deprecation-cop": "0.9.0",
"dev-live-reload": "0.34.0",
"exception-reporting": "0.20.0",
"feedback": "0.33.0",
"find-and-replace": "0.117.0",
"fuzzy-finder": "0.54.0",
"git-diff": "0.31.0",
"go-to-line": "0.22.0",
"find-and-replace": "0.128.0",
"fuzzy-finder": "0.57.0",
"git-diff": "0.37.0",
"go-to-line": "0.24.0",
"grammar-selector": "0.27.0",
"image-view": "0.35.0",
"keybinding-resolver": "0.18.0",
"link": "0.22.0",
"markdown-preview": "0.76.0",
"metrics": "0.32.0",
"open-on-github": "0.28.0",
"package-generator": "0.30.0",
"release-notes": "0.32.0",
"settings-view": "0.121.0",
"snippets": "0.45.0",
"spell-check": "0.37.0",
"status-bar": "0.40.0",
"image-view": "0.36.0",
"incompatible-packages": "0.8.0",
"keybinding-resolver": "0.19.0",
"link": "0.25.0",
"markdown-preview": "0.99.0",
"metrics": "0.33.0",
"open-on-github": "0.29.0",
"package-generator": "0.31.0",
"release-notes": "0.36.0",
"settings-view": "0.139.0",
"snippets": "0.51.0",
"spell-check": "0.41.0",
"status-bar": "0.42.0",
"styleguide": "0.29.0",
"symbols-view": "0.55.0",
"tabs": "0.41.0",
"timecop": "0.19.0",
"tree-view": "0.100.0",
"symbols-view": "0.63.0",
"tabs": "0.49.0",
"timecop": "0.22.0",
"tree-view": "0.112.0",
"update-package-dependencies": "0.6.0",
"welcome": "0.16.0",
"whitespace": "0.22.0",
"wrap-guide": "0.18.0",
"language-c": "0.17.0",
"language-coffee-script": "0.22.0",
"welcome": "0.17.0",
"whitespace": "0.25.0",
"wrap-guide": "0.21.0",
"language-c": "0.27.0",
"language-coffee-script": "0.29.0",
"language-css": "0.17.0",
"language-gfm": "0.39.0",
"language-gfm": "0.46.0",
"language-git": "0.9.0",
"language-go": "0.12.0",
"language-html": "0.22.0",
"language-go": "0.16.0",
"language-html": "0.24.0",
"language-hyperlink": "0.10.0",
"language-java": "0.10.0",
"language-javascript": "0.27.0",
"language-java": "0.11.0",
"language-javascript": "0.39.0",
"language-json": "0.8.0",
"language-less": "0.9.0",
"language-less": "0.13.0",
"language-make": "0.10.0",
"language-objective-c": "0.11.0",
"language-perl": "0.9.0",
"language-php": "0.15.0",
"language-property-list": "0.7.0",
"language-python": "0.18.0",
"language-ruby": "0.27.0",
"language-ruby-on-rails": "0.14.0",
"language-sass": "0.13.0",
"language-ruby": "0.34.0",
"language-ruby-on-rails": "0.15.0",
"language-sass": "0.16.0",
"language-shellscript": "0.8.0",
"language-source": "0.7.0",
"language-sql": "0.8.0",
"language-source": "0.8.0",
"language-sql": "0.10.0",
"language-text": "0.6.0",
"language-todo": "0.10.0",
"language-toml": "0.12.0",
"language-xml": "0.14.0",
"language-yaml": "0.6.0"
"language-xml": "0.18.0",
"language-yaml": "0.15.0"
},
"private": true,
"scripts": {
+2 -2
Ver Arquivo
@@ -1,8 +1,8 @@
[Desktop Entry]
Name=Atom
Comment=<%= description %>
Exec=/usr/share/atom/atom %U
Icon=atom
Exec=<%= installDir %>/share/atom/atom %U
Icon=<%= iconName %>
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;TextEditor;
+45 -8
Ver Arquivo
@@ -10,6 +10,8 @@ function executeCommands(commands, done, index) {
index = (index == undefined ? 0 : index);
if (index < commands.length) {
var command = commands[index];
if (command.message)
console.log(command.message);
var options = null;
if (typeof command !== 'string') {
options = command.options;
@@ -29,22 +31,57 @@ function bootstrap() {
fs.mkdirSync(path.join(apmInstallPath, 'node_modules'));
var apmPath = path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', 'apm')
var apmFlags = process.env.JANKY_SHA1 || process.argv.indexOf('--no-color') !== -1 ? '--no-color' : '';
var apmFlags = process.env.JANKY_SHA1 || process.argv.indexOf('--no-color') !== -1 ? ' --no-color' : '';
var npmPath = path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'npm');
var initialNpmCommand = fs.existsSync(npmPath) ? npmPath : 'npm';
var npmFlags = ' --userconfig=' + path.resolve('.npmrc') + ' ';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'oniguruma', 'roaster', 'season', 'grim'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var buildInstallCommand = initialNpmCommand + npmFlags + 'install';
var buildInstallOptions = {cwd: path.resolve(__dirname, '..', 'build')};
var apmInstallCommand = npmPath + npmFlags + 'install';
var apmInstallOptions = {cwd: apmInstallPath};
var moduleInstallCommand = apmPath + ' install' + apmFlags;
var dedupeApmCommand = apmPath + ' dedupe' + apmFlags;
var dedupeNpmCommand = npmPath + npmFlags + 'dedupe';
if (process.argv.indexOf('--no-quiet') === -1) {
buildInstallCommand += ' --quiet';
apmInstallCommand += ' --quiet';
moduleInstallCommand += ' --quiet';
dedupeApmCommand += ' --quiet';
dedupeNpmCommand += ' --quiet';
buildInstallOptions.ignoreStdout = true;
apmInstallOptions.ignoreStdout = true;
}
// apm ships with 32-bit node so make sure its native modules are compiled
// for a 32-bit target architecture
if (process.env.JANKY_SHA1 && process.platform === 'win32')
apmInstallCommand += ' --arch=ia32';
var commands = [
{command: initialNpmCommand + npmFlags + 'install --quiet', options: {cwd: path.resolve(__dirname, '..', 'build'), ignoreStdout: true}},
{command: npmPath + npmFlags + 'install --quiet', options: {cwd: apmInstallPath, ignoreStdout: true}},
echoNewLine,
apmPath + ' clean ' + apmFlags,
apmPath + ' install --quiet ' + apmFlags,
apmPath + ' dedupe --quiet ' + apmFlags + ' ' + packagesToDedupe.join(' '),
{
command: buildInstallCommand,
message: 'Installing build modules...',
options: buildInstallOptions
},
{
command: apmInstallCommand,
message: 'Installing apm...',
options: apmInstallOptions
},
apmPath + ' clean' + apmFlags,
moduleInstallCommand,
dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
{
command: dedupeNpmCommand + ' request semver',
options: {
cwd: path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager')
}
},
];
process.chdir(path.dirname(__dirname));
+9 -3
Ver Arquivo
@@ -19,12 +19,18 @@ function loadEnvironmentVariables(filePath) {
var value = parts[1].trim().substr(1, parts[1].length - 2);
process.env[key] = value;
}
} catch(error) { }
} catch(error) {
console.error("Failed to load environment variables: " + filePath, error.code);
}
}
function readEnvironmentVariables() {
loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials')
loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain')
if (process.platform === 'win32')
loadEnvironmentVariables(path.resolve('/jenkins/config/atomcredentials'));
else {
loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials');
loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain');
}
}
readEnvironmentVariables();
+1
Ver Arquivo
@@ -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'],
];
+38
Ver Arquivo
@@ -2,6 +2,7 @@ path = require 'path'
_ = require 'underscore-plus'
{convertStackTrace} = require 'coffeestack'
{View, $, $$} = require '../src/space-pen-extensions'
grim = require 'grim'
sourceMaps = {}
formatStackTrace = (spec, message='', stackTrace) ->
@@ -52,6 +53,11 @@ class AtomReporter extends View
@div outlet: "message", class: 'message'
@div outlet: "results", class: 'results'
@div outlet: "deprecations", class: 'status alert alert-warning', style: 'display: none', =>
@span outlet: 'deprecationStatus', '0 deprecations'
@div class: 'deprecation-toggle'
@div outlet: 'deprecationList', class: 'deprecation-list'
startedAt: null
runningSpecCount: 0
completeSpecCount: 0
@@ -59,6 +65,7 @@ class AtomReporter extends View
failedCount: 0
skippedCount: 0
totalSpecCount: 0
deprecationCount: 0
@timeoutId: 0
reportRunnerStarting: (runner) ->
@@ -88,6 +95,29 @@ class AtomReporter extends View
reportSpecStarting: (spec) ->
@specStarted(spec)
addDeprecations: (spec) ->
deprecations = grim.getDeprecations()
@deprecationCount += deprecations.length
@deprecations.show() if @deprecationCount > 0
if @deprecationCount is 1
@deprecationStatus.text("1 deprecation")
else
@deprecationStatus.text("#{@deprecationCount} deprecations")
for deprecation in deprecations
@deprecationList.append $$ ->
@div class: 'padded', =>
@div class: 'result-message fail deprecation-message', deprecation.message
for stack in deprecation.stacks
fullStack = stack.map ({functionName, location}) ->
if functionName is '<unknown>'
" at #{location}"
else
" at #{functionName} (#{location})"
@pre class: 'stack-trace padded', formatStackTrace(spec, deprecation.message, fullStack.join('\n'))
grim.clearDeprecations()
handleEvents: ->
$(document).on "click", ".spec-toggle", ({currentTarget}) =>
element = $(currentTarget)
@@ -96,6 +126,13 @@ class AtomReporter extends View
element.toggleClass('folded')
false
$(document).on "click", ".deprecation-toggle", ({currentTarget}) =>
element = $(currentTarget)
deprecationList = $(document).find('.deprecation-list')
deprecationList.toggle()
element.toggleClass('folded')
false
updateSpecCounts: ->
if @skippedCount
specCount = "#{@completeSpecCount - @skippedCount}/#{@totalSpecCount - @skippedCount} (#{@skippedCount} skipped)"
@@ -175,6 +212,7 @@ class AtomReporter extends View
specView = new SpecResultView(spec)
specView.attach()
@failedCount++
@addDeprecations(spec)
class SuiteResultView extends View
@content: ->
+16 -1
Ver Arquivo
@@ -531,7 +531,22 @@ 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
describe "window:update-available", ->
it "is triggered when the auto-updater sends the update-downloaded event", ->
updateAvailableHandler = jasmine.createSpy("update-available-handler")
atom.workspaceView.on 'window:update-available', updateAvailableHandler
autoUpdater = require('remote').require('auto-updater')
autoUpdater.emit 'update-downloaded', null, "notes", "version"
waitsFor ->
updateAvailableHandler.callCount > 0
runs ->
[event, version, notes] = updateAvailableHandler.mostRecentCall.args
expect(notes).toBe 'notes'
expect(version).toBe 'version'
+12
Ver Arquivo
@@ -23,6 +23,18 @@ describe "Config", ->
retrievedValue.array[1].b = 2.1
expect(atom.config.get('value')).toEqual(array: [1, b: 2, 3])
it "merges defaults into the returned value if both the assigned value and the default value are objects", ->
atom.config.setDefaults("foo", a: 1, b: 2)
atom.config.set("foo", a: 3)
expect(atom.config.get("foo")).toEqual {a: 3, b: 2}
atom.config.set("foo", 7)
expect(atom.config.get("foo")).toBe 7
atom.config.set("bar.baz", a: 3)
atom.config.setDefaults("bar", baz: 7)
expect(atom.config.get("bar.baz")).toEqual {a: 3}
describe ".set(keyPath, value)", ->
it "allows a key path's value to be written", ->
expect(atom.config.set("foo.bar.baz", 42)).toBe 42
+37
Ver Arquivo
@@ -17,6 +17,43 @@ describe "ContextMenuManager", ->
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
it 'does not add duplicate menu items', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
contextMenu.add 'file-path',
'.selector':
'label': 'command'
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
expect(contextMenu.definitions['.selector'].length).toBe 1
it 'allows multiple separators', ->
contextMenu.add 'file-path',
'.selector':
'separator1': '-'
'separator2': '-'
expect(contextMenu.definitions['.selector'].length).toBe 2
expect(contextMenu.definitions['.selector'][0].type).toEqual 'separator'
expect(contextMenu.definitions['.selector'][1].type).toEqual 'separator'
it 'allows duplicate commands with different labels', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
contextMenu.add 'file-path',
'.selector':
'another label': 'command'
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
expect(contextMenu.definitions['.selector'][1].label).toEqual 'another label'
expect(contextMenu.definitions['.selector'][1].command).toEqual 'command'
it "loads submenus", ->
contextMenu.add 'file-path',
'.selector':
+161 -5
Ver Arquivo
@@ -47,6 +47,15 @@ describe "DisplayBuffer", ->
buffer.insert([0,0], oneHundredLines)
expect(displayBuffer.getLineCount()).toBe 100 + originalLineCount
it "reassigns the scrollTop if it exceeds the max possible value after lines are removed", ->
displayBuffer.manageScrollPosition = true
displayBuffer.setHeight(50)
displayBuffer.setLineHeightInPixels(10)
displayBuffer.setScrollTop(80)
buffer.delete([[8, 0], [10, 0]])
expect(displayBuffer.getScrollTop()).toBe 60
describe "soft wrapping", ->
beforeEach ->
displayBuffer.setSoftWrap(true)
@@ -206,6 +215,19 @@ describe "DisplayBuffer", ->
displayBuffer.setEditorWidthInChars(-1)
expect(displayBuffer.editorWidthInChars).not.toBe -1
it "sets ::scrollLeft to 0 and keeps it there when soft wrapping is enabled", ->
displayBuffer.setDefaultCharWidth(10)
displayBuffer.setWidth(50)
displayBuffer.manageScrollPosition = true
displayBuffer.setSoftWrap(false)
displayBuffer.setScrollLeft(Infinity)
expect(displayBuffer.getScrollLeft()).toBeGreaterThan 0
displayBuffer.setSoftWrap(true)
expect(displayBuffer.getScrollLeft()).toBe 0
displayBuffer.setScrollLeft(10)
expect(displayBuffer.getScrollLeft()).toBe 0
describe "primitive folding", ->
beforeEach ->
displayBuffer.destroy()
@@ -315,6 +337,14 @@ describe "DisplayBuffer", ->
expect(line0.fold).toBe outerFold
expect(line1.fold).toBeUndefined()
describe "when a fold ends where another fold begins", ->
it "continues to hide the lines inside the second fold", ->
fold2 = displayBuffer.createFold(4, 9)
fold1 = displayBuffer.createFold(0, 4)
expect(displayBuffer.lineForRow(0).text).toMatch /^0/
expect(displayBuffer.lineForRow(1).text).toMatch /^10/
describe "when there is another display buffer pointing to the same buffer", ->
it "does not create folds in the other display buffer", ->
otherDisplayBuffer = new DisplayBuffer({buffer, tabLength})
@@ -624,6 +654,19 @@ describe "DisplayBuffer", ->
buffer.delete([[6, 0], [6, 65]])
expect(displayBuffer.getMaxLineLength()).toBe 62
it "correctly updates the location of the longest screen line when changes occur", ->
expect(displayBuffer.getLongestScreenRow()).toBe 6
buffer.delete([[0, 0], [2, 0]])
expect(displayBuffer.getLongestScreenRow()).toBe 4
buffer.delete([[4, 0], [5, 0]])
expect(displayBuffer.getLongestScreenRow()).toBe 1
expect(displayBuffer.getMaxLineLength()).toBe 62
buffer.delete([[2, 0], [4, 0]])
expect(displayBuffer.getLongestScreenRow()).toBe 1
expect(displayBuffer.getMaxLineLength()).toBe 62
describe "::destroy()", ->
it "unsubscribes all display buffer markers from their underlying buffer marker (regression)", ->
marker = displayBuffer.markBufferPosition([12, 2])
@@ -912,6 +955,42 @@ describe "DisplayBuffer", ->
expect(displayBuffer.findMarkers(class: 'a', startBufferRow: 0, endBufferRow: 3)).toEqual [marker1]
expect(displayBuffer.findMarkers(endBufferRow: 10)).toEqual [marker3]
it "allows the startScreenRow and endScreenRow to be specified", ->
marker1 = displayBuffer.markBufferRange([[6, 0], [7, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[9, 0], [10, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', startScreenRow: 6, endScreenRow: 7)).toEqual [marker2]
it "allows intersectsBufferRowRange to be specified", ->
marker1 = displayBuffer.markBufferRange([[5, 0], [5, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[8, 0], [8, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', intersectsBufferRowRange: [5, 6])).toEqual [marker1]
it "allows intersectsScreenRowRange to be specified", ->
marker1 = displayBuffer.markBufferRange([[5, 0], [5, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[8, 0], [8, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', intersectsScreenRowRange: [5, 10])).toEqual [marker2]
it "allows containedInScreenRange to be specified", ->
marker1 = displayBuffer.markBufferRange([[5, 0], [5, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[8, 0], [8, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', containedInScreenRange: [[5, 0], [7, 0]])).toEqual [marker2]
it "allows intersectsBufferRange to be specified", ->
marker1 = displayBuffer.markBufferRange([[5, 0], [5, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[8, 0], [8, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', intersectsBufferRange: [[5, 0], [6, 0]])).toEqual [marker1]
it "allows intersectsScreenRange to be specified", ->
marker1 = displayBuffer.markBufferRange([[5, 0], [5, 0]], class: 'a')
marker2 = displayBuffer.markBufferRange([[8, 0], [8, 0]], class: 'a')
displayBuffer.createFold(4, 7)
expect(displayBuffer.findMarkers(class: 'a', intersectsScreenRange: [[5, 0], [10, 0]])).toEqual [marker2]
describe "marker destruction", ->
it "allows markers to be destroyed", ->
marker = displayBuffer.markScreenRange([[5, 4], [5, 10]])
@@ -950,12 +1029,45 @@ describe "DisplayBuffer", ->
displayBuffer.setLineHeightInPixels(20)
displayBuffer.setDefaultCharWidth(10)
displayBuffer.setScopedCharWidths(["source.js", "keyword.control.js"], r: 11, e: 11, t: 11, u: 11, n: 11)
for char in ['r', 'e', 't', 'u', 'r', 'n']
displayBuffer.setScopedCharWidth(["source.js", "keyword.control.js"], char, 11)
{start, end} = marker.getPixelRange()
expect(start.top).toBe 5 * 20
expect(start.left).toBe (4 * 10) + (6 * 11)
describe "decorations", ->
[marker, decoration, decorationParams] = []
beforeEach ->
marker = displayBuffer.markBufferRange([[2, 13], [3, 15]])
decorationParams = {type: 'gutter', class: 'one'}
decoration = displayBuffer.decorateMarker(marker, decorationParams)
it "can add decorations associated with markers and remove them", ->
expect(decoration).toBeDefined()
expect(decoration.getParams()).toBe decorationParams
expect(displayBuffer.decorationForId(decoration.id)).toBe decoration
expect(displayBuffer.decorationsForScreenRowRange(2, 3)[marker.id][0]).toBe decoration
decoration.destroy()
expect(displayBuffer.decorationsForScreenRowRange(2, 3)[marker.id]).not.toBeDefined()
expect(displayBuffer.decorationForId(decoration.id)).not.toBeDefined()
it "will not fail if the decoration is removed twice", ->
decoration.destroy()
decoration.destroy()
expect(displayBuffer.decorationForId(decoration.id)).not.toBeDefined()
describe "when a decoration is updated via Decoration::update()", ->
it "emits an 'updated' event containing the new and old params", ->
decoration.on 'updated', updatedSpy = jasmine.createSpy()
decoration.update type: 'gutter', class: 'two'
{oldParams, newParams} = updatedSpy.mostRecentCall.args[0]
expect(oldParams).toEqual decorationParams
expect(newParams).toEqual type: 'gutter', class: 'two', id: decoration.id
describe "::setScrollTop", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
@@ -997,17 +1109,61 @@ describe "DisplayBuffer", ->
expect(displayBuffer.setScrollLeft(maxScrollLeft + 50)).toBe maxScrollLeft
expect(displayBuffer.getScrollLeft()).toBe maxScrollLeft
describe "::scrollToScreenPosition(position)", ->
it "sets the scroll top and scroll left so the given screen position is in view", ->
describe "::scrollToScreenPosition(position, [options])", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
displayBuffer.setLineHeightInPixels(10)
displayBuffer.setDefaultCharWidth(10)
displayBuffer.setHorizontalScrollbarHeight(0)
displayBuffer.setHeight(50)
displayBuffer.setWidth(50)
maxScrollTop = displayBuffer.getScrollHeight() - displayBuffer.getHeight()
it "sets the scroll top and scroll left so the given screen position is in view", ->
displayBuffer.scrollToScreenPosition([8, 20])
expect(displayBuffer.getScrollBottom()).toBe (9 + displayBuffer.getVerticalScrollMargin()) * 10
expect(displayBuffer.getScrollRight()).toBe (20 + displayBuffer.getHorizontalScrollMargin()) * 10
describe "when the 'center' option is true", ->
it "vertically scrolls to center the given position vertically", ->
displayBuffer.scrollToScreenPosition([8, 20], center: true)
expect(displayBuffer.getScrollTop()).toBe (8 * 10) + 5 - (50 / 2)
expect(displayBuffer.getScrollRight()).toBe (20 + displayBuffer.getHorizontalScrollMargin()) * 10
it "does not scroll vertically if the position is already in view", ->
displayBuffer.scrollToScreenPosition([4, 20], center: true)
expect(displayBuffer.getScrollTop()).toBe 0
describe "scroll width", ->
cursorWidth = 1
beforeEach ->
displayBuffer.setDefaultCharWidth(10)
it "recomputes the scroll width when the default character width changes", ->
expect(displayBuffer.getScrollWidth()).toBe 10 * 65 + cursorWidth
displayBuffer.setDefaultCharWidth(12)
expect(displayBuffer.getScrollWidth()).toBe 12 * 65 + cursorWidth
it "recomputes the scroll width when the max line length changes", ->
buffer.insert([6, 12], ' ')
expect(displayBuffer.getScrollWidth()).toBe 10 * 66 + cursorWidth
buffer.delete([[6, 10], [6, 12]], ' ')
expect(displayBuffer.getScrollWidth()).toBe 10 * 64 + cursorWidth
it "recomputes the scroll width when the scoped character widths change", ->
operatorWidth = 20
displayBuffer.setScopedCharWidth(['source.js', 'keyword.operator.js'], '<', operatorWidth)
expect(displayBuffer.getScrollWidth()).toBe 10 * 64 + operatorWidth + cursorWidth
it "recomputes the scroll width when the scoped character widths change in a batch", ->
operatorWidth = 20
displayBuffer.on 'character-widths-changed', changedSpy = jasmine.createSpy()
displayBuffer.batchCharacterMeasurement ->
displayBuffer.setScopedCharWidth(['source.js', 'keyword.operator.js'], '<', operatorWidth)
displayBuffer.setScopedCharWidth(['source.js', 'keyword.operator.js'], '?', operatorWidth)
expect(displayBuffer.getScrollWidth()).toBe 10 * 63 + operatorWidth * 2 + cursorWidth
expect(changedSpy.callCount).toBe 1
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+191 -107
Ver Arquivo
@@ -499,6 +499,15 @@ describe "Editor", ->
cursor = editor.getCursor()
expect(cursor.getBufferPosition()).toEqual [1,0]
describe "when invisible characters are enabled", ->
it "moves to the first character of the current line without being confused by the invisible characters", ->
atom.config.set('editor.showInvisibles', true)
editor.setCursorScreenPosition [1,7]
editor.moveCursorToFirstCharacterOfLine()
expect(editor.getCursorBufferPosition()).toEqual [1,2]
editor.moveCursorToFirstCharacterOfLine()
expect(editor.getCursorBufferPosition()).toEqual [1,0]
describe ".moveCursorToBeginningOfWord()", ->
it "moves the cursor to the beginning of the word", ->
editor.setCursorBufferPosition [0, 8]
@@ -785,6 +794,19 @@ describe "Editor", ->
editor.moveCursorLeft()
expect(editor.getScrollLeft()).toBe 58 * 10
it "scrolls down when inserting lines makes the document longer than the editor's height", ->
editor.setCursorScreenPosition([13, Infinity])
editor.insertNewline()
expect(editor.getScrollBottom()).toBe 14 * 10
editor.insertNewline()
expect(editor.getScrollBottom()).toBe 15 * 10
it "autoscrolls to the cursor when it moves due to undo", ->
editor.insertText('abc')
editor.setScrollTop(Infinity)
editor.undo()
expect(editor.getScrollTop()).toBe 0
describe "selection", ->
selection = null
@@ -1196,6 +1218,7 @@ describe "Editor", ->
editor.setHeight(50)
editor.setWidth(50)
editor.setHorizontalScrollbarHeight(0)
expect(editor.getScrollTop()).toBe 0
editor.setSelectedBufferRange([[5, 6], [6, 8]], autoscroll: true)
@@ -1220,6 +1243,23 @@ describe "Editor", ->
expect(editor.selectMarker(marker)).toBeFalsy()
expect(editor.getSelectedBufferRange()).toEqual [[0, 0], [0, 0]]
describe ".addSelectionForBufferRange(bufferRange)", ->
it "adds a selection for the specified buffer range", ->
editor.addSelectionForBufferRange([[3, 4], [5, 6]])
expect(editor.getSelectedBufferRanges()).toEqual [[[0, 0], [0, 0]], [[3, 4], [5, 6]]]
it "autoscrolls to the added selection if needed", ->
editor.manageScrollPosition = true
editor.setLineHeightInPixels(10)
editor.setDefaultCharWidth(10)
editor.setHeight(50)
editor.setWidth(50)
editor.addSelectionForBufferRange([[8, 10], [8, 15]])
expect(editor.getScrollTop()).toBe 75
expect(editor.getScrollLeft()).toBe 160
describe ".addSelectionBelow()", ->
describe "when the selection is non-empty", ->
it "selects the same region of the line below current selections if possible", ->
@@ -1439,6 +1479,15 @@ describe "Editor", ->
describe "buffer manipulation", ->
describe ".insertText(text)", ->
describe "when there is a single selection", ->
beforeEach ->
editor.setSelectedBufferRange([[1, 0], [1, 2]])
it "will-insert-text and did-insert-text events are emitted when inserting text", ->
range = editor.insertText('xxx')
expect(range).toEqual [ [[1, 0], [1, 3]] ]
expect(buffer.lineForRow(1)).toBe 'xxxvar sort = function(items) {'
describe "when there are multiple empty selections", ->
describe "when the cursors are on the same line", ->
it "inserts the given text at the location of each cursor and moves the cursors to the end of each cursor's inserted text", ->
@@ -1467,6 +1516,17 @@ describe "Editor", ->
expect(cursor1.getBufferPosition()).toEqual [1, 5]
expect(cursor2.getBufferPosition()).toEqual [2, 7]
it "autoscrolls to the last cursor", ->
editor.manageScrollPosition = true
editor.setCursorScreenPosition([1, 2])
editor.addCursorAtScreenPosition([10, 4])
editor.setLineHeightInPixels(10)
editor.setHeight(50)
expect(editor.getScrollTop()).toBe 0
editor.insertText('a')
expect(editor.getScrollTop()).toBe 80
describe "when there are multiple non-empty selections", ->
describe "when the selections are on the same line", ->
it "replaces each selection range with the inserted characters", ->
@@ -1505,6 +1565,48 @@ describe "Editor", ->
editor.insertText('holy cow')
expect(editor.lineForScreenRow(2).fold).toBeUndefined()
describe "when will-insert-text and did-insert-text events are used", ->
beforeEach ->
editor.setSelectedBufferRange([[1, 0], [1, 2]])
it "will-insert-text and did-insert-text events are emitted when inserting text", ->
willInsertSpy = jasmine.createSpy().andCallFake ->
expect(buffer.lineForRow(1)).toBe ' var sort = function(items) {'
didInsertSpy = jasmine.createSpy().andCallFake ->
expect(buffer.lineForRow(1)).toBe 'xxxvar sort = function(items) {'
editor.on('will-insert-text', willInsertSpy)
editor.on('did-insert-text', didInsertSpy)
expect(editor.insertText('xxx')).toBeTruthy()
expect(buffer.lineForRow(1)).toBe 'xxxvar sort = function(items) {'
expect(willInsertSpy).toHaveBeenCalled()
expect(didInsertSpy).toHaveBeenCalled()
options = willInsertSpy.mostRecentCall.args[0]
expect(options.text).toBe 'xxx'
expect(options.cancel).toBeDefined()
options = didInsertSpy.mostRecentCall.args[0]
expect(options.text).toBe 'xxx'
it "text insertion is prevented when cancel is called from a will-insert-text handler", ->
willInsertSpy = jasmine.createSpy().andCallFake ({cancel}) ->
cancel()
didInsertSpy = jasmine.createSpy()
editor.on('will-insert-text', willInsertSpy)
editor.on('did-insert-text', didInsertSpy)
expect(editor.insertText('xxx')).toBe false
expect(buffer.lineForRow(1)).toBe ' var sort = function(items) {'
expect(willInsertSpy).toHaveBeenCalled()
expect(didInsertSpy).not.toHaveBeenCalled()
describe ".insertNewline()", ->
describe "when there is a single cursor", ->
describe "when the cursor is at the beginning of a line", ->
@@ -1831,6 +1933,32 @@ describe "Editor", ->
expect(buffer.lineForRow(1)).toBe ' var sort = function(it) {'
expect(buffer.lineForRow(2)).toBe 'if (items.length <= 1) return items;'
describe '.deleteToEndOfLine()', ->
describe 'when no text is selected', ->
it 'deletes all text between the cursor and the end of the line', ->
editor.setCursorBufferPosition([1, 24])
editor.addCursorAtBufferPosition([2, 5])
[cursor1, cursor2] = editor.getCursors()
editor.deleteToEndOfLine()
expect(buffer.lineForRow(1)).toBe ' var sort = function(it'
expect(buffer.lineForRow(2)).toBe ' i'
expect(cursor1.getBufferPosition()).toEqual [1, 24]
expect(cursor2.getBufferPosition()).toEqual [2, 5]
describe 'when at the end of the line', ->
it 'deletes the next newline', ->
editor.setCursorBufferPosition([1, 30])
editor.deleteToEndOfLine()
expect(buffer.lineForRow(1)).toBe ' var sort = function(items) { if (items.length <= 1) return items;'
describe 'when text is selected', ->
it 'deletes only the text in the selection', ->
editor.setSelectedBufferRanges([[[1, 24], [1, 27]], [[2, 0], [2, 4]]])
editor.deleteToEndOfLine()
expect(buffer.lineForRow(1)).toBe ' var sort = function(it) {'
expect(buffer.lineForRow(2)).toBe 'if (items.length <= 1) return items;'
describe ".deleteToBeginningOfLine()", ->
describe "when no text is selected", ->
it "deletes all text between the cursor and the beginning of the line", ->
@@ -2013,6 +2141,20 @@ describe "Editor", ->
editor.indent()
expect(buffer.lineForRow(0)).toMatch(tabRegex)
it "respects the tab stops when cursor is in the middle of a tab", ->
editor.setTabLength(4)
buffer.insert([12, 2], "\n ")
editor.setCursorBufferPosition [13, 1]
editor.indent()
expect(buffer.lineForRow(13)).toMatch /^\s+$/
expect(buffer.lineForRow(13).length).toBe 4
expect(editor.getCursorBufferPosition()).toEqual [13, 4]
buffer.insert([13, 0], " ")
editor.setCursorBufferPosition [13, 6]
editor.indent()
expect(buffer.lineForRow(13).length).toBe 8
describe "if 'softTabs' is false", ->
it "insert a \t into the buffer", ->
editor.setSoftTabs(false)
@@ -2031,6 +2173,20 @@ describe "Editor", ->
expect(buffer.lineForRow(5).length).toBe 6
expect(editor.getCursorBufferPosition()).toEqual [5, 6]
it "respects the tab stops when cursor is in the middle of a tab", ->
editor.setTabLength(4)
buffer.insert([12, 2], "\n ")
editor.setCursorBufferPosition [13, 1]
editor.indent(autoIndent: true)
expect(buffer.lineForRow(13)).toMatch /^\s+$/
expect(buffer.lineForRow(13).length).toBe 4
expect(editor.getCursorBufferPosition()).toEqual [13, 4]
buffer.insert([13, 0], " ")
editor.setCursorBufferPosition [13, 6]
editor.indent(autoIndent: true)
expect(buffer.lineForRow(13).length).toBe 8
describe "when 'softTabs' is false", ->
it "moves the cursor to the end of the leading whitespace and inserts enough tabs to bring the line to the suggested level of indentaion", ->
convertToHardTabs(buffer)
@@ -2761,7 +2917,7 @@ describe "Editor", ->
atom.config.set("editor.autoIndent", false)
editor.indent()
expect(editor.lineForBufferRow(2)).toBe " "
expect(editor.lineForBufferRow(2)).toBe " "
describe "when editor.autoIndent is true", ->
beforeEach ->
@@ -3205,20 +3361,25 @@ describe "Editor", ->
expect(editor.getText()).toBe ' '
describe ".scrollToCursorPosition()", ->
it "scrolls the last cursor into view", ->
it "scrolls the last cursor into view, centering around the cursor if possible and the 'center' option isn't false", ->
editor.setCursorScreenPosition([8, 8])
editor.setLineHeightInPixels(10)
editor.setDefaultCharWidth(10)
editor.setHeight(50)
editor.setHeight(60)
editor.setWidth(50)
editor.setHorizontalScrollbarHeight(0)
expect(editor.getScrollTop()).toBe 0
expect(editor.getScrollLeft()).toBe 0
editor.scrollToCursorPosition()
expect(editor.getScrollBottom()).toBe (9 + editor.getVerticalScrollMargin()) * 10
expect(editor.getScrollTop()).toBe (8.5 * 10) - 30
expect(editor.getScrollBottom()).toBe (8.5 * 10) + 30
expect(editor.getScrollRight()).toBe (9 + editor.getHorizontalScrollMargin()) * 10
editor.setScrollTop(0)
editor.scrollToCursorPosition(center: false)
expect(editor.getScrollBottom()).toBe (9 + editor.getVerticalScrollMargin()) * 10
describe ".pageUp/Down()", ->
it "scrolls one screen height up or down and moves the cursor one page length", ->
editor.manageScrollPosition = true
@@ -3244,113 +3405,36 @@ describe "Editor", ->
expect(editor.getScrollTop()).toBe 0
expect(editor.getCursorBufferPosition().row).toBe 0
describe "decorations", ->
decoration = null
beforeEach ->
decoration = {type: 'gutter', class: 'one'}
describe ".selectPageUp/Down()", ->
it "selects one screen height of text up or down", ->
editor.manageScrollPosition = true
it "can add decorations to buffer rows and remove them", ->
editor.addDecorationToBufferRow(2, decoration)
editor.addDecorationToBufferRow(2, decoration)
editor.setLineHeightInPixels(10)
editor.setHeight(50)
expect(editor.getScrollHeight()).toBe 130
expect(editor.getCursorBufferPosition().row).toBe 0
decorations = editor.decorationsForBufferRow(2)
expect(decorations).toHaveLength 1
expect(decorations).toContain decoration
editor.selectPageDown()
expect(editor.getScrollTop()).toBe 30
expect(editor.getSelectedBufferRanges()).toEqual [[[0,0], [5,0]]]
editor.removeDecorationFromBufferRow(2, decoration)
decorations = editor.decorationsForBufferRow(2)
expect(decorations).toHaveLength 0
editor.selectPageDown()
expect(editor.getScrollTop()).toBe 80
expect(editor.getSelectedBufferRanges()).toEqual [[[0,0], [10,0]]]
it "can add decorations to buffer row ranges and remove them", ->
editor.addDecorationToBufferRowRange(2, 4, decoration)
expect(editor.decorationsForBufferRow 2).toContain decoration
expect(editor.decorationsForBufferRow 3).toContain decoration
expect(editor.decorationsForBufferRow 4).toContain decoration
editor.selectPageDown()
expect(editor.getScrollTop()).toBe 80
expect(editor.getSelectedBufferRanges()).toEqual [[[0,0], [12,2]]]
editor.removeDecorationFromBufferRowRange(3, 5, decoration)
expect(editor.decorationsForBufferRow 2).toContain decoration
expect(editor.decorationsForBufferRow 3).not.toContain decoration
expect(editor.decorationsForBufferRow 4).not.toContain decoration
editor.moveCursorToBottom()
editor.selectPageUp()
expect(editor.getScrollTop()).toBe 50
expect(editor.getSelectedBufferRanges()).toEqual [[[7,0], [12,2]]]
it "can add decorations associated with markers and remove them", ->
marker = editor.displayBuffer.markBufferRange([[2, 13], [3, 15]], class: 'my-marker', invalidate: 'inside')
editor.selectPageUp()
expect(editor.getScrollTop()).toBe 0
expect(editor.getSelectedBufferRanges()).toEqual [[[2,0], [12,2]]]
editor.addDecorationForMarker(marker, decoration)
expect(editor.decorationsForBufferRow 1).not.toContain decoration
expect(editor.decorationsForBufferRow 2).toContain decoration
expect(editor.decorationsForBufferRow 3).toContain decoration
expect(editor.decorationsForBufferRow 4).not.toContain decoration
editor.getBuffer().insert([0, 0], '\n')
expect(editor.decorationsForBufferRow 2).not.toContain decoration
expect(editor.decorationsForBufferRow 3).toContain decoration
expect(editor.decorationsForBufferRow 4).toContain decoration
expect(editor.decorationsForBufferRow 5).not.toContain decoration
editor.getBuffer().insert([4, 2], 'n')
expect(editor.decorationsForBufferRow 2).not.toContain decoration
expect(editor.decorationsForBufferRow 3).not.toContain decoration
expect(editor.decorationsForBufferRow 4).not.toContain decoration
expect(editor.decorationsForBufferRow 5).not.toContain decoration
editor.getBuffer().undo()
expect(editor.decorationsForBufferRow 2).not.toContain decoration
expect(editor.decorationsForBufferRow 3).toContain decoration
expect(editor.decorationsForBufferRow 4).toContain decoration
expect(editor.decorationsForBufferRow 5).not.toContain decoration
editor.removeDecorationForMarker(marker, decoration)
expect(editor.decorationsForBufferRow 2).not.toContain decoration
expect(editor.decorationsForBufferRow 3).not.toContain decoration
expect(editor.decorationsForBufferRow 4).not.toContain decoration
expect(editor.decorationsForBufferRow 5).not.toContain decoration
describe "decorationsForBufferRow", ->
one = {type: 'one', class: 'one'}
two = {type: 'two', class: 'two'}
typeless = {class: 'typeless'}
beforeEach ->
editor.addDecorationToBufferRow(2, one)
editor.addDecorationToBufferRow(2, two)
editor.addDecorationToBufferRow(2, typeless)
it "returns all decorations with no decorationType specified", ->
decorations = editor.decorationsForBufferRow(2)
expect(decorations).toContain one
expect(decorations).toContain two
expect(decorations).toContain typeless
it "returns typeless decorations with all decorationTypes", ->
decorations = editor.decorationsForBufferRow(2, 'one')
expect(decorations).toContain one
expect(decorations).not.toContain two
expect(decorations).toContain typeless
describe "decorationsForBufferRowRange", ->
one = {type: 'one', class: 'one'}
two = {type: 'two', class: 'two'}
typeless = {class: 'typeless'}
it "returns an object of decorations based on the decorationType", ->
editor.addDecorationToBufferRow(2, one)
editor.addDecorationToBufferRow(3, one)
editor.addDecorationToBufferRow(5, one)
editor.addDecorationToBufferRow(3, two)
editor.addDecorationToBufferRow(4, two)
editor.addDecorationToBufferRow(3, typeless)
editor.addDecorationToBufferRow(5, typeless)
decorations = editor.decorationsForBufferRowRange(2, 5, 'one')
expect(decorations[2]).toContain one
expect(decorations[3]).toContain one
expect(decorations[3]).not.toContain two
expect(decorations[3]).toContain typeless
expect(decorations[4]).toHaveLength 0
expect(decorations[5]).toContain one
expect(decorations[5]).toContain typeless
editor.selectPageUp()
expect(editor.getScrollTop()).toBe 0
expect(editor.getSelectedBufferRanges()).toEqual [[[0,0], [12,2]]]
+7 -39
Ver Arquivo
@@ -1611,7 +1611,7 @@ describe "EditorView", ->
editorView.attachToDom()
expect(atom.config.get("editor.showInvisibles")).toBeFalsy()
expect(editorView.renderedLines.find('.line').text()).toBe " a line with tabs and spaces "
expect(editorView.renderedLines.find('.line').text()).toBe " a line with tabs and spaces "
atom.config.set("editor.showInvisibles", true)
space = editorView.invisibles?.space
@@ -1620,10 +1620,10 @@ describe "EditorView", ->
expect(tab).toBeTruthy()
eol = editorView.invisibles?.eol
expect(eol).toBeTruthy()
expect(editorView.renderedLines.find('.line').text()).toBe "#{space}a line with tabs#{tab} and spaces#{space}#{eol}"
expect(editorView.renderedLines.find('.line').text()).toBe "#{space}a line with tabs#{tab}and spaces#{space}#{eol}"
atom.config.set("editor.showInvisibles", false)
expect(editorView.renderedLines.find('.line').text()).toBe " a line with tabs and spaces "
expect(editorView.renderedLines.find('.line').text()).toBe " a line with tabs and spaces "
it "displays newlines as their own token outside of the other tokens scope", ->
editorView.setShowInvisibles(true)
@@ -1636,7 +1636,7 @@ describe "EditorView", ->
editorView.attachToDom()
atom.config.set("editor.showInvisibles", true)
atom.config.set("editor.invisibles", eol: ";", space: "_", tab: "tab")
expect(editorView.find(".line:first").text()).toBe "_tab _;"
expect(editorView.find(".line:first").text()).toBe "_tab_;"
it "displays trailing carriage return using a visible non-empty value", ->
editor.setText "a line that ends with a carriage return\r\n"
@@ -2082,7 +2082,7 @@ describe "EditorView", ->
tab = miniEditor.invisibles?.tab
expect(tab).toBeTruthy()
miniEditor.getEditor().setText(" a line with tabs\tand spaces ")
expect(miniEditor.renderedLines.find('.line').text()).toBe "#{space}a line with tabs#{tab} and spaces#{space}"
expect(miniEditor.renderedLines.find('.line').text()).toBe "#{space}a line with tabs#{tab}and spaces#{space}"
it "doesn't show the indent guide", ->
atom.config.set "editor.showIndentGuide", true
@@ -2414,37 +2414,6 @@ describe "EditorView", ->
expect(editor.getCursor().getScreenPosition().row).toBe(0)
expect(editorView.getFirstVisibleScreenRow()).toBe(0)
describe ".checkoutHead()", ->
[filePath] = []
beforeEach ->
workingDirPath = temp.mkdirSync('atom-working-dir')
fs.copySync(path.join(__dirname, 'fixtures', 'git', 'working-dir'), workingDirPath)
fs.renameSync(path.join(workingDirPath, 'git.git'), path.join(workingDirPath, '.git'))
atom.project.setPath(workingDirPath)
filePath = atom.project.resolve('file.txt')
waitsForPromise ->
atom.workspace.open(filePath).then (o) -> editor = o
runs ->
editorView.edit(editor)
it "restores the contents of the editor view to the HEAD revision", ->
editor.setText('')
editor.save()
fileChangeHandler = jasmine.createSpy('fileChange')
editor.getBuffer().file.on 'contents-changed', fileChangeHandler
editorView.checkoutHead()
waitsFor "file to trigger contents-changed event", ->
fileChangeHandler.callCount > 0
runs ->
expect(editor.getText()).toBe('undefined')
describe ".pixelPositionForBufferPosition(position)", ->
describe "when the editor view is detached", ->
it "returns top and left values of 0", ->
@@ -2652,7 +2621,6 @@ describe "EditorView", ->
expect(editor.getCursorBufferPosition()).toEqual [0, 0]
expect(buffer.lineForRow(0)).toBe 'var quicksort = function () {'
expect(buffer.lineForRow(13)).toBe 'var a = function() {'
editor.logScreenLines()
expect(editor.isFoldedAtBufferRow(0)).toBe true
expect(editor.isFoldedAtBufferRow(13)).toBe true
@@ -2999,8 +2967,8 @@ describe "EditorView", ->
expect(editorView.lineElementForScreenRow(rowNumber).text()).toBe buffer.lineForRow(rowNumber)
it "correctly calculates the position left for non-monospaced invisibles", ->
editorView.setShowInvisibles(true)
editorView.setInvisibles tab: ''
atom.config.set('editor.showInvisibles', true)
atom.config.set('editor.invisibles', tab: '')
editor.setText('\tx')
editorView.setFontFamily('serif')
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 392 B

-1
Ver Arquivo
@@ -1 +0,0 @@
this tests files with no extensions
@@ -0,0 +1 @@
throw new Error("this simulates a native module's failure to load")
@@ -0,0 +1,4 @@
{
"name": "native-module",
"main": "./main.js"
}
@@ -0,0 +1,5 @@
{
"name": "package-with-incompatible-native-module",
"version": "1.0",
"main": "./main.js"
}
@@ -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)"
}
]
}
]
@@ -1 +0,0 @@
This is a hidden file. Don't even try to load it as a snippet
@@ -1 +0,0 @@
This file isn't CSON, but shouldn't be a big deal
@@ -1,4 +0,0 @@
".test":
"Test Snippet":
prefix: "test"
body: "testing 123"
@@ -0,0 +1,4 @@
{
"theme": "ui",
"stylesheets": ["editor.less"]
}
@@ -0,0 +1,10 @@
@import "ui-variables";
.editor {
padding-top: @component-padding;
padding-right: @component-padding;
padding-bottom: @component-padding;
color: @input-background-color;
background-color: @background-color-info; // From the fallback variables, not overridden
}
@@ -0,0 +1,3 @@
// This does not contain all of the ui-variables available.
@app-background-color: #00f; // Changed
@input-background-color: #f00; // Changed
@@ -1,3 +0,0 @@
@import "stylesheets/first";
@import "stylesheets/second";
@import "stylesheets/last";
@@ -1,3 +0,0 @@
{
"theme": "ui"
}
@@ -1,7 +0,0 @@
.editor {
padding-top: 101px;
padding-right: 101px;
padding-bottom: 101px;
color: red;
}
@@ -1,5 +0,0 @@
.editor {
/* padding-top: 103px;
padding-right: 103px;*/
padding-bottom: 103px;
}
@@ -1,9 +0,0 @@
@import "ui-variables";
@number: 102px;
.editor {
/* padding-top: 102px;*/
padding-right: @number;
padding-bottom: @number;
}
@@ -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;
-1
Ver Arquivo
@@ -1 +0,0 @@
Hello World!
-1
Ver Arquivo
@@ -1 +0,0 @@
Goodbye World!
-1
Ver Arquivo
@@ -1 +0,0 @@
Hello World!
-1
Ver Arquivo
@@ -1 +0,0 @@
Goodbye World!
-1
Ver Arquivo
@@ -1 +0,0 @@
#header {
-71
Ver Arquivo
@@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>txt</string>
</array>
<key>keyEquivalent</key>
<string>^~P</string>
<key>name</key>
<string>Plain Text</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.item.text</string>
</dict>
</dict>
<key>match</key>
<string>^\s*(•).*$\n?</string>
<key>name</key>
<string>meta.bullet-point.strong.text</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.item.text</string>
</dict>
</dict>
<key>match</key>
<string>^\s*(·).*$\n?</string>
<key>name</key>
<string>meta.bullet-point.light.text</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.item.text</string>
</dict>
</dict>
<key>match</key>
<string>^\s*(\*).*$\n?</string>
<key>name</key>
<string>meta.bullet-point.star.text</string>
</dict>
<dict>
<key>begin</key>
<string>^([ \t]*)(?=\S)</string>
<key>contentName</key>
<string>meta.paragraph.text</string>
<key>end</key>
<string>^(?!\1(?=\S))</string>
</dict>
</array>
<key>scopeName</key>
<string>text.plain</string>
<key>uuid</key>
<string>3130E4FA-B10E-11D9-9F75-000D93589AF6</string>
</dict>
</plist>
-1
Ver Arquivo
@@ -1 +0,0 @@
dir
-1
Ver Arquivo
@@ -1 +0,0 @@
sample.js
-1
Ver Arquivo
@@ -1 +0,0 @@
a
+32
Ver Arquivo
@@ -119,6 +119,38 @@ describe "Git", ->
repo.checkoutHead(filePath)
expect(statusHandler.callCount).toBe 1
describe ".checkoutHeadForEditor(editor)", ->
[filePath, editor] = []
beforeEach ->
workingDirPath = copyRepository()
repo = new Git(workingDirPath)
filePath = path.join(workingDirPath, 'a.txt')
fs.writeFileSync(filePath, 'ch ch changes')
waitsForPromise ->
atom.workspace.open(filePath)
runs ->
editor = atom.workspace.getActiveEditor()
it "displays a confirmation dialog by default", ->
spyOn(atom, 'confirm').andCallFake ({buttons}) -> buttons.OK()
atom.config.set('editor.confirmCheckoutHeadRevision', true)
repo.checkoutHeadForEditor(editor)
expect(fs.readFileSync(filePath, 'utf8')).toBe ''
it "does not display a dialog when confirmation is disabled", ->
spyOn(atom, 'confirm')
atom.config.set('editor.confirmCheckoutHeadRevision', false)
repo.checkoutHeadForEditor(editor)
expect(fs.readFileSync(filePath, 'utf8')).toBe ''
expect(atom.confirm).not.toHaveBeenCalled()
describe ".destroy()", ->
it "throws an exception when any method is called after it is called", ->
repo = new Git(require.resolve('./fixtures/git/master.git/HEAD'))
+2 -1
Ver Arquivo
@@ -1,7 +1,8 @@
fs = require 'fs'
module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
{$, $$} = require 'atom'
{$, $$} = require '../src/space-pen-extensions'
window[key] = value for key, value of require '../vendor/jasmine'
{TerminalReporter} = require 'jasmine-tagged'
+31
Ver Arquivo
@@ -1,8 +1,39 @@
{$} = require 'atom'
path = require 'path'
Package = require '../src/package'
ThemePackage = require '../src/theme-package'
describe "Package", ->
describe "when the package contains incompatible native modules", ->
beforeEach ->
spyOn(atom, 'inDevMode').andReturn(false)
it "does not activate it", ->
packagePath = atom.project.resolve('packages/package-with-incompatible-native-module')
pack = new Package(packagePath)
expect(pack.isCompatible()).toBe false
expect(pack.incompatibleModules[0].name).toBe 'native-module'
expect(pack.incompatibleModules[0].path).toBe path.join(packagePath, 'node_modules', 'native-module')
it "caches the incompatible native modules in local storage", ->
packagePath = atom.project.resolve('packages/package-with-incompatible-native-module')
cacheKey = null
cacheItem = null
spyOn(global.localStorage, 'setItem').andCallFake (key, item) ->
cacheKey = key
cacheItem = item
spyOn(global.localStorage, 'getItem').andCallFake (key) ->
return cacheItem if cacheKey is key
expect(new Package(packagePath).isCompatible()).toBe false
expect(global.localStorage.getItem.callCount).toBe 1
expect(global.localStorage.setItem.callCount).toBe 1
expect(new Package(packagePath).isCompatible()).toBe false
expect(global.localStorage.getItem.callCount).toBe 2
expect(global.localStorage.setItem.callCount).toBe 1
describe "theme", ->
theme = null
+14
Ver Arquivo
@@ -205,6 +205,20 @@ describe "Project", ->
fs.writeFileSync(filePath, sampleContent)
fs.writeFileSync(commentFilePath, sampleCommentContent)
describe "when a file doesn't exist", ->
it "calls back with an error", ->
errors = []
missingPath = path.resolve('/not-a-file.js')
expect(fs.existsSync(missingPath)).toBeFalsy()
waitsForPromise ->
atom.project.replace /items/gi, 'items', [missingPath], (result, error) ->
errors.push(error)
runs ->
expect(errors).toHaveLength 1
expect(errors[0].path).toBe missingPath
describe "when called with unopened files", ->
it "replaces properly", ->
results = []
+26 -5
Ver Arquivo
@@ -15,6 +15,7 @@ Project = require '../src/project'
Editor = require '../src/editor'
EditorView = require '../src/editor-view'
TokenizedBuffer = require '../src/tokenized-buffer'
EditorComponent = require '../src/editor-component'
pathwatcher = require 'pathwatcher'
clipboard = require 'clipboard'
@@ -27,13 +28,18 @@ atom.keymaps.loadBundledKeymaps()
keyBindingsToRestore = atom.keymaps.getKeyBindings()
$(window).on 'core:close', -> window.close()
$(window).on 'unload', ->
$(window).on 'beforeunload', ->
atom.storeWindowDimensions()
atom.saveSync()
$('html,body').css('overflow', 'auto')
jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions
jasmine.getEnv().defaultTimeoutInterval = 5000
if process.platform is 'win32' and process.env.JANKY_SHA1
# Use longer timeout on Windows CI
jasmine.getEnv().defaultTimeoutInterval = 60000
else
jasmine.getEnv().defaultTimeoutInterval = 5000
specPackageName = null
specPackagePath = null
@@ -95,6 +101,8 @@ beforeEach ->
# make editor display updates synchronous
spyOn(EditorView.prototype, 'requestDisplayUpdate').andCallFake -> @updateDisplay()
EditorComponent.performSyncUpdates = true
spyOn(WorkspaceView.prototype, 'setTitle').andCallFake (@title) ->
spyOn(window, "setTimeout").andCallFake window.fakeSetTimeout
spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout
@@ -122,6 +130,8 @@ afterEach ->
atom.project?.destroy()
atom.project = null
atom.themes.removeStylesheet('global-editor-styles')
delete atom.state.packageStates
$('#jasmine-content').empty() unless window.debugContent
@@ -201,6 +211,13 @@ addCustomMatchers = (spec) ->
element = element.get(0) if element.jquery
element.webkitMatchesSelector(":focus") or element.querySelector(":focus")
toShow: ->
notText = if @isNot then " not" else ""
element = @actual
element = element.get(0) if element.jquery
@message = -> return "Expected element '#{element}' or its descendants #{notText} to show."
element.style.display in ['block', 'inline-block', 'static', 'fixed']
window.keyIdentifierForKey = (key) ->
if key.length > 1 # named key
key
@@ -310,9 +327,13 @@ window.setEditorWidthInChars = (editorView, widthInChars, charWidth=editorView.c
editorView.width(charWidth * widthInChars + editorView.gutter.outerWidth())
$(window).trigger 'resize' # update width of editor view's on-screen lines
window.setEditorHeightInLines = (editorView, heightInChars, charHeight=editorView.lineHeight) ->
editorView.height(charHeight * heightInChars + editorView.renderedLines.position().top)
$(window).trigger 'resize' # update editor view's on-screen lines
window.setEditorHeightInLines = (editorView, heightInLines, lineHeight=editorView.lineHeight) ->
if editorView.hasClass('react')
editorView.height(editorView.getEditor().getLineHeightInPixels() * heightInLines)
editorView.component?.measureHeightAndWidth()
else
editorView.height(lineHeight * heightInLines + editorView.renderedLines.position().top)
$(window).trigger 'resize' # update editor view's on-screen lines
$.fn.resultOfTrigger = (type) ->
event = $.Event(type)
-1
Ver Arquivo
@@ -1,6 +1,5 @@
_ = require 'underscore-plus'
fs = require 'fs-plus'
{Git} = require 'atom'
path = require 'path'
require './spec-helper'
+71
Ver Arquivo
@@ -232,6 +232,21 @@ describe "ThemeManager", ->
expect($(".editor").css("padding-right")).toBe "150px"
expect($(".editor").css("padding-bottom")).toBe "150px"
describe "when there is a theme with incomplete variables", ->
it "loads the correct values from the fallback ui-variables", ->
themeManager.on 'reloaded', reloadHandler = jasmine.createSpy()
atom.config.set('core.themes', ['theme-with-incomplete-ui-variables'])
waitsFor ->
reloadHandler.callCount > 0
runs ->
# an override loaded in the base css
expect(atom.workspaceView.css("background-color")).toBe "rgb(0, 0, 255)"
# from within the theme itself
expect($(".editor").css("background-color")).toBe "rgb(0, 152, 255)"
describe "when the user stylesheet changes", ->
it "reloads it", ->
[stylesheetRemovedHandler, stylesheetAddedHandler, stylesheetsChangedHandler] = []
@@ -295,3 +310,59 @@ describe "ThemeManager", ->
runs ->
expect(console.warn.callCount).toBe 1
expect(console.warn.argsForCall[0][0].length).toBeGreaterThan 0
describe "when in safe mode", ->
beforeEach ->
themeManager = new ThemeManager({packageManager: atom.packages, resourcePath, configDirPath, safeMode: true})
describe 'when the enabled UI and syntax themes are bundled with Atom', ->
beforeEach ->
atom.config.set('core.themes', ['atom-light-ui', 'atom-dark-syntax'])
waitsForPromise ->
themeManager.activateThemes()
it 'uses the enabled themes', ->
activeThemeNames = themeManager.getActiveNames()
expect(activeThemeNames.length).toBe(2)
expect(activeThemeNames).toContain('atom-light-ui')
expect(activeThemeNames).toContain('atom-dark-syntax')
describe 'when the enabled UI and syntax themes are not bundled with Atom', ->
beforeEach ->
atom.config.set('core.themes', ['installed-dark-ui', 'installed-dark-syntax'])
waitsForPromise ->
themeManager.activateThemes()
it 'uses the default dark UI and syntax themes', ->
activeThemeNames = themeManager.getActiveNames()
expect(activeThemeNames.length).toBe(2)
expect(activeThemeNames).toContain('atom-dark-ui')
expect(activeThemeNames).toContain('atom-dark-syntax')
describe 'when the enabled UI theme is not bundled with Atom', ->
beforeEach ->
atom.config.set('core.themes', ['installed-dark-ui', 'atom-light-syntax'])
waitsForPromise ->
themeManager.activateThemes()
it 'uses the default dark UI theme', ->
activeThemeNames = themeManager.getActiveNames()
expect(activeThemeNames.length).toBe(2)
expect(activeThemeNames).toContain('atom-dark-ui')
expect(activeThemeNames).toContain('atom-light-syntax')
describe 'when the enabled syntax theme is not bundled with Atom', ->
beforeEach ->
atom.config.set('core.themes', ['atom-light-ui', 'installed-dark-syntax'])
waitsForPromise ->
themeManager.activateThemes()
it 'uses the default dark syntax theme', ->
activeThemeNames = themeManager.getActiveNames()
expect(activeThemeNames.length).toBe(2)
expect(activeThemeNames).toContain('atom-light-ui')
expect(activeThemeNames).toContain('atom-dark-syntax')
+206 -6
Ver Arquivo
@@ -1,4 +1,5 @@
TokenizedBuffer = require '../src/tokenized-buffer'
TextBuffer = require 'text-buffer'
_ = require 'underscore-plus'
describe "TokenizedBuffer", ->
@@ -12,6 +13,9 @@ describe "TokenizedBuffer", ->
waitsForPromise ->
atom.packages.activatePackage('language-javascript')
afterEach ->
tokenizedBuffer?.destroy()
startTokenizing = (tokenizedBuffer) ->
tokenizedBuffer.setVisible(true)
@@ -335,16 +339,84 @@ describe "TokenizedBuffer", ->
expect(screenLine0.text).toBe "# Econ 101#{tabAsSpaces}"
{ tokens } = screenLine0
expect(tokens.length).toBe 3
expect(tokens.length).toBe 4
expect(tokens[0].value).toBe "#"
expect(tokens[1].value).toBe " Econ 101"
expect(tokens[2].value).toBe tabAsSpaces
expect(tokens[2].scopes).toEqual tokens[1].scopes
expect(tokens[2].isAtomic).toBeTruthy()
expect(tokens[3].value).toBe ""
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "#{tabAsSpaces} buy()#{tabAsSpaces}while supply > demand"
describe "when the buffer contains surrogate pairs", ->
it "aligns the hard tabs to the correct tab stop column", ->
buffer.setText """
1\t2 \t3\t4
12\t3 \t4\t5
123\t4 \t5\t6
"""
tokenizedBuffer.setTabLength(4)
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2 3 4"
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].screenDelta).toBe 3
expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3 4 5"
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].screenDelta).toBe 2
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4 5 6"
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].screenDelta).toBe 1
tokenizedBuffer.setTabLength(3)
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2 3 4"
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].screenDelta).toBe 2
expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3 4 5"
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].screenDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4 5 6"
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].screenDelta).toBe 3
tokenizedBuffer.setTabLength(2)
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2 3 4"
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].screenDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3 4 5"
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].screenDelta).toBe 2
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4 5 6"
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].screenDelta).toBe 1
tokenizedBuffer.setTabLength(1)
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2 3 4"
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(0).tokens[1].screenDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3 4 5"
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].screenDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4 5 6"
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].bufferDelta).toBe 1
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].screenDelta).toBe 1
describe "when the buffer contains UTF-8 surrogate pairs", ->
beforeEach ->
waitsForPromise ->
atom.packages.activatePackage('language-javascript')
@@ -362,7 +434,7 @@ describe "TokenizedBuffer", ->
tokenizedBuffer.destroy()
buffer.release()
it "renders each surrogate pair as its own atomic token", ->
it "renders each UTF-8 surrogate pair as its own atomic token", ->
screenLine0 = tokenizedBuffer.lineForScreenRow(0)
expect(screenLine0.text).toBe "'abc\uD835\uDF97def'"
{ tokens } = screenLine0
@@ -379,11 +451,12 @@ describe "TokenizedBuffer", ->
expect(screenLine1.text).toBe "//\uD835\uDF97xyz"
{ tokens } = screenLine1
expect(tokens.length).toBe 3
expect(tokens.length).toBe 4
expect(tokens[0].value).toBe '//'
expect(tokens[1].value).toBe '\uD835\uDF97'
expect(tokens[1].value).toBeTruthy()
expect(tokens[2].value).toBe 'xyz'
expect(tokens[3].value).toBe ''
describe "when the grammar is tokenized", ->
it "emits the `tokenized` event", ->
@@ -515,42 +588,95 @@ describe "TokenizedBuffer", ->
atom.config.set('editor.tabLength', 0)
expect(tokenizedBuffer.tokenForPosition([0,0]).value).toBe ' '
describe "when the invisibles value changes", ->
beforeEach ->
it "updates the tokens with the appropriate invisible characters", ->
buffer = new TextBuffer(text: " \t a line with tabs\tand \tspaces \t ")
tokenizedBuffer = new TokenizedBuffer({buffer})
fullyTokenize(tokenizedBuffer)
tokenizedBuffer.setInvisibles(space: 'S', tab: 'T')
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "SST Sa line with tabsTand T spacesSTS"
# Also needs to work for copies
expect(tokenizedBuffer.lineForScreenRow(0).copy().text).toBe "SST Sa line with tabsTand T spacesSTS"
it "assigns endOfLineInvisibles to tokenized lines", ->
buffer = new TextBuffer(text: "a line that ends in a carriage-return-line-feed \r\na line that ends in just a line-feed\na line with no ending")
tokenizedBuffer = new TokenizedBuffer({buffer})
atom.config.set('editor.showInvisibles', true)
tokenizedBuffer.setInvisibles(cr: 'R', eol: 'N')
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).endOfLineInvisibles).toEqual ['R', 'N']
expect(tokenizedBuffer.lineForScreenRow(1).endOfLineInvisibles).toEqual ['N']
# Lines ending in soft wraps get no invisibles
[left, right] = tokenizedBuffer.lineForScreenRow(0).softWrapAt(20)
expect(left.endOfLineInvisibles).toBe null
expect(right.endOfLineInvisibles).toEqual ['R', 'N']
tokenizedBuffer.setInvisibles(cr: 'R', eol: false)
expect(tokenizedBuffer.lineForScreenRow(0).endOfLineInvisibles).toEqual ['R']
expect(tokenizedBuffer.lineForScreenRow(1).endOfLineInvisibles).toEqual []
describe "leading and trailing whitespace", ->
beforeEach ->
buffer = atom.project.bufferForPathSync('sample.js')
tokenizedBuffer = new TokenizedBuffer({buffer})
fullyTokenize(tokenizedBuffer)
it "sets ::hasLeadingWhitespace to true on tokens that have leading whitespace", ->
it "sets ::hasLeadingWhitespace to true and assigns ::firstNonWhitespaceIndex on tokens that have leading whitespace", ->
expect(tokenizedBuffer.lineForScreenRow(0).tokens[0].hasLeadingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(0).tokens[0].firstNonWhitespaceIndex).toBe null
expect(tokenizedBuffer.lineForScreenRow(1).tokens[0].hasLeadingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(1).tokens[0].firstNonWhitespaceIndex).toBe 2
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].hasLeadingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(1).tokens[1].firstNonWhitespaceIndex).toBe null
expect(tokenizedBuffer.lineForScreenRow(2).tokens[0].hasLeadingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(2).tokens[0].firstNonWhitespaceIndex).toBe 2
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].hasLeadingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(2).tokens[1].firstNonWhitespaceIndex).toBe 2
expect(tokenizedBuffer.lineForScreenRow(2).tokens[2].hasLeadingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(2).tokens[2].firstNonWhitespaceIndex).toBe null
# The 4th token *has* leading whitespace, but isn't entirely whitespace
buffer.insert([5, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(5).tokens[3].hasLeadingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(5).tokens[3].firstNonWhitespaceIndex).toBe 1
expect(tokenizedBuffer.lineForScreenRow(5).tokens[4].hasLeadingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(5).tokens[4].firstNonWhitespaceIndex).toBe null
# Lines that are *only* whitespace are not considered to have leading whitespace
buffer.insert([10, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(10).tokens[0].hasLeadingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(10).tokens[0].firstNonWhitespaceIndex).toBe null
it "sets ::hasTrailingWhitespace to true on tokens that have trailing whitespace", ->
it "sets ::hasTrailingWhitespace to true and assigns ::firstTrailingWhitespaceIndex on tokens that have trailing whitespace", ->
buffer.insert([0, Infinity], ' ')
expect(tokenizedBuffer.lineForScreenRow(0).tokens[11].hasTrailingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(0).tokens[11].firstTrailingWhitespaceIndex).toBe null
expect(tokenizedBuffer.lineForScreenRow(0).tokens[12].hasTrailingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(0).tokens[12].firstTrailingWhitespaceIndex).toBe 0
# The last token *has* trailing whitespace, but isn't entirely whitespace
buffer.setTextInRange([[2, 39], [2, 40]], ' ')
expect(tokenizedBuffer.lineForScreenRow(2).tokens[14].hasTrailingWhitespace).toBe false
expect(tokenizedBuffer.lineForScreenRow(2).tokens[14].firstTrailingWhitespaceIndex).toBe null
expect(tokenizedBuffer.lineForScreenRow(2).tokens[15].hasTrailingWhitespace).toBe true
console.log tokenizedBuffer.lineForScreenRow(2).tokens[15]
expect(tokenizedBuffer.lineForScreenRow(2).tokens[15].firstTrailingWhitespaceIndex).toBe 6
# Lines that are *only* whitespace are considered to have trailing whitespace
buffer.insert([10, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(10).tokens[0].hasTrailingWhitespace).toBe true
expect(tokenizedBuffer.lineForScreenRow(10).tokens[0].firstTrailingWhitespaceIndex).toBe 0
it "only marks trailing whitespace on the last segment of a soft-wrapped line", ->
buffer.insert([0, Infinity], ' ')
@@ -558,8 +684,20 @@ describe "TokenizedBuffer", ->
[segment1, segment2] = tokenizedLine.softWrapAt(16)
expect(segment1.tokens[5].value).toBe ' '
expect(segment1.tokens[5].hasTrailingWhitespace).toBe false
expect(segment1.tokens[5].firstTrailingWhitespaceIndex).toBe null
expect(segment2.tokens[6].value).toBe ' '
expect(segment2.tokens[6].hasTrailingWhitespace).toBe true
expect(segment2.tokens[6].firstTrailingWhitespaceIndex).toBe 0
it "sets leading and trailing whitespace correctly on a line with invisible characters that is copied", ->
buffer.setText(" \t a line with tabs\tand \tspaces \t ")
tokenizedBuffer.setInvisibles(space: 'S', tab: 'T')
fullyTokenize(tokenizedBuffer)
line = tokenizedBuffer.lineForScreenRow(0).copy()
expect(line.tokens[0].hasLeadingWhitespace).toBe true
expect(line.tokens[line.tokens.length - 1].hasTrailingWhitespace).toBe true
describe "indent level", ->
beforeEach ->
@@ -588,3 +726,65 @@ describe "TokenizedBuffer", ->
buffer.setText('\n\n\n')
expect(tokenizedBuffer.lineForScreenRow(1).indentLevel).toBe 0
describe "when the changed lines are surrounded by whitespace-only lines", ->
it "updates the indentLevel of empty lines that precede the change", ->
expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 0
buffer.insert([12, 0], '\n')
buffer.insert([13, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 1
it "updates empty line indent guides when the empty line is the last line", ->
buffer.insert([12, 2], '\n')
# The newline and he tab need to be in two different operations to surface the bug
buffer.insert([12, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(13).indentLevel).toBe 1
buffer.insert([12, 0], ' ')
expect(tokenizedBuffer.lineForScreenRow(13).indentLevel).toBe 2
expect(tokenizedBuffer.lineForScreenRow(14)).not.toBeDefined()
it "updates the indentLevel of empty lines surrounding a change that inserts lines", ->
# create some new lines
buffer.insert([7, 0], '\n\n')
buffer.insert([5, 0], '\n\n')
expect(tokenizedBuffer.lineForScreenRow(5).indentLevel).toBe 3
expect(tokenizedBuffer.lineForScreenRow(6).indentLevel).toBe 3
expect(tokenizedBuffer.lineForScreenRow(9).indentLevel).toBe 3
expect(tokenizedBuffer.lineForScreenRow(10).indentLevel).toBe 3
expect(tokenizedBuffer.lineForScreenRow(11).indentLevel).toBe 2
tokenizedBuffer.on "changed", changeHandler = jasmine.createSpy('changeHandler')
buffer.setTextInRange([[7, 0], [8, 65]], ' one\n two\n three\n four')
delete changeHandler.argsForCall[0][0].bufferChange
expect(changeHandler).toHaveBeenCalledWith(start: 5, end: 10, delta: 2)
expect(tokenizedBuffer.lineForScreenRow(5).indentLevel).toBe 4
expect(tokenizedBuffer.lineForScreenRow(6).indentLevel).toBe 4
expect(tokenizedBuffer.lineForScreenRow(11).indentLevel).toBe 4
expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 4
expect(tokenizedBuffer.lineForScreenRow(13).indentLevel).toBe 2
it "updates the indentLevel of empty lines surrounding a change that removes lines", ->
# create some new lines
buffer.insert([7, 0], '\n\n')
buffer.insert([5, 0], '\n\n')
tokenizedBuffer.on "changed", changeHandler = jasmine.createSpy('changeHandler')
buffer.setTextInRange([[7, 0], [8, 65]], ' ok')
delete changeHandler.argsForCall[0][0].bufferChange
expect(changeHandler).toHaveBeenCalledWith(start: 5, end: 10, delta: -1)
expect(tokenizedBuffer.lineForScreenRow(5).indentLevel).toBe 2
expect(tokenizedBuffer.lineForScreenRow(6).indentLevel).toBe 2
expect(tokenizedBuffer.lineForScreenRow(7).indentLevel).toBe 2 # new text
expect(tokenizedBuffer.lineForScreenRow(8).indentLevel).toBe 2
expect(tokenizedBuffer.lineForScreenRow(9).indentLevel).toBe 2
expect(tokenizedBuffer.lineForScreenRow(10).indentLevel).toBe 2 # }
+14
Ver Arquivo
@@ -4,6 +4,20 @@ describe "TokenizedLine", ->
beforeEach ->
waitsForPromise -> atom.packages.activatePackage('language-coffee-script')
describe "::isOnlyWhitespace()", ->
beforeEach ->
waitsForPromise ->
atom.project.open('coffee.coffee').then (o) -> editor = o
it "returns true when the line is only whitespace", ->
expect(editor.lineForScreenRow(3).isOnlyWhitespace()).toBe true
expect(editor.lineForScreenRow(7).isOnlyWhitespace()).toBe true
expect(editor.lineForScreenRow(23).isOnlyWhitespace()).toBe true
it "returns false when the line is not only whitespace", ->
expect(editor.lineForScreenRow(0).isOnlyWhitespace()).toBe false
expect(editor.lineForScreenRow(2).isOnlyWhitespace()).toBe false
describe "::getScopeTree()", ->
it "returns a tree whose inner nodes are scopes and whose leaf nodes are tokens in those scopes", ->
[tokens, tokenIndex] = []
+2 -1
Ver Arquivo
@@ -113,6 +113,7 @@ describe "Window", ->
expect(atom.state.project).toEqual projectState
expect(atom.saveSync).toHaveBeenCalled()
describe ".removeEditorWindow()", ->
it "unsubscribes from all buffers", ->
waitsForPromise ->
atom.workspace.open("sample.js")
@@ -123,7 +124,7 @@ describe "Window", ->
pane.splitRight(pane.copyActiveItem())
expect(atom.workspaceView.find('.editor').length).toBe 2
atom.unloadEditorWindow()
atom.removeEditorWindow()
expect(buffer.getSubscriptionCount()).toBe 0
+25
Ver Arquivo
@@ -309,3 +309,28 @@ describe "Workspace", ->
expect(handler.callCount).toBe 1
editorCopy = editor.copy()
expect(handler.callCount).toBe 2
it "stores the active grammars used by all the open editors", ->
waitsForPromise ->
atom.packages.activatePackage('language-javascript')
waitsForPromise ->
atom.packages.activatePackage('language-coffee-script')
waitsForPromise ->
atom.workspace.open('sample.coffee')
runs ->
atom.workspace.getActiveEditor().setText('i = /test/;')
state = atom.workspace.serialize()
expect(state.packagesWithActiveGrammars).toEqual ['language-coffee-script', 'language-javascript']
jsPackage = atom.packages.getLoadedPackage('language-javascript')
coffeePackage = atom.packages.getLoadedPackage('language-coffee-script')
spyOn(jsPackage, 'loadGrammarsSync')
spyOn(coffeePackage, 'loadGrammarsSync')
workspace2 = Workspace.deserialize(state)
expect(jsPackage.loadGrammarsSync.callCount).toBe 1
expect(coffeePackage.loadGrammarsSync.callCount).toBe 1
+31 -5
Ver Arquivo
@@ -20,7 +20,6 @@ describe "WorkspaceView", ->
waitsForPromise ->
atom.workspace.open(pathToOpen)
describe "@deserialize()", ->
viewState = null
@@ -196,14 +195,13 @@ describe "WorkspaceView", ->
atom.workspaceView.height(200)
atom.workspaceView.attachToDom()
rightEditorView = atom.workspaceView.getActiveView()
rightEditorView.getEditor().setText(" \t ")
rightEditorView.getEditor().setText("\t \n")
leftEditorView = rightEditorView.splitLeft()
expect(rightEditorView.find(".line:first").text()).toBe " "
expect(leftEditorView.find(".line:first").text()).toBe " "
{invisibles} = rightEditorView.component.state
{space, tab, eol} = invisibles
withInvisiblesShowing = "#{space}#{tab} #{space}#{eol}"
{space, tab, eol} = atom.config.get('editor.invisibles')
withInvisiblesShowing = "#{tab} #{space}#{space}#{eol}"
atom.workspaceView.trigger "window:toggle-invisibles"
expect(rightEditorView.find(".line:first").text()).toBe withInvisiblesShowing
@@ -294,3 +292,31 @@ describe "WorkspaceView", ->
expect(atom.workspaceView).toHaveClass 'scrollbars-visible-always'
scrollbarStyle.emitValue 'overlay'
expect(atom.workspaceView).toHaveClass 'scrollbars-visible-when-scrolling'
describe "editor font styling", ->
[editorNode, editor] = []
beforeEach ->
atom.workspaceView.attachToDom()
editorNode = atom.workspaceView.find('.editor')[0]
editor = atom.workspaceView.find('.editor').view().getEditor()
it "updates the font-size based on the 'editor.fontSize' config value", ->
initialCharWidth = editor.getDefaultCharWidth()
expect(getComputedStyle(editorNode).fontSize).toBe atom.config.get('editor.fontSize') + 'px'
atom.config.set('editor.fontSize', atom.config.get('editor.fontSize') + 5)
expect(getComputedStyle(editorNode).fontSize).toBe atom.config.get('editor.fontSize') + 'px'
expect(editor.getDefaultCharWidth()).toBeGreaterThan initialCharWidth
it "updates the font-family based on the 'editor.fontFamily' config value", ->
initialCharWidth = editor.getDefaultCharWidth()
expect(getComputedStyle(editorNode).fontFamily).toBe atom.config.get('editor.fontFamily')
atom.config.set('editor.fontFamily', 'sans-serif')
expect(getComputedStyle(editorNode).fontFamily).toBe atom.config.get('editor.fontFamily')
expect(editor.getDefaultCharWidth()).not.toBe initialCharWidth
it "updates the line-height based on the 'editor.lineHeight' config value", ->
initialLineHeight = editor.getLineHeightInPixels()
atom.config.set('editor.lineHeight', '30px')
expect(getComputedStyle(editorNode).lineHeight).toBe atom.config.get('editor.lineHeight')
expect(editor.getLineHeightInPixels()).not.toBe initialLineHeight
+49 -30
Ver Arquivo
@@ -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
@@ -158,13 +150,13 @@ class Atom extends Model
process.env.NODE_PATH = exportsPath
# Make react.js faster
process.env.NODE_ENV ?= 'production'
process.env.NODE_ENV ?= 'production' unless devMode
@config = new Config({configDirPath, resourcePath})
@keymaps = new KeymapManager({configDirPath, resourcePath})
@keymap = @keymaps # Deprecated
@packages = new PackageManager({devMode, configDirPath, resourcePath, safeMode})
@themes = new ThemeManager({packageManager: @packages, configDirPath, resourcePath})
@themes = new ThemeManager({packageManager: @packages, configDirPath, resourcePath, safeMode})
@contextMenu = new ContextMenuManager(devMode)
@menu = new MenuManager({resourcePath})
@clipboard = new Clipboard()
@@ -225,9 +217,15 @@ class Atom extends Model
else
@center()
# Returns true if the dimensions are useable, false if they should be ignored.
# Work around for https://github.com/atom/atom-shell/issues/473
isValidDimensions: ({x, y, width, height}={}) ->
width > 0 and height > 0 and x + width > 0 and y + height > 0
storeDefaultWindowDimensions: ->
dimensions = JSON.stringify(atom.getWindowDimensions())
localStorage.setItem("defaultWindowDimensions", dimensions)
dimensions = @getWindowDimensions()
if @isValidDimensions(dimensions)
localStorage.setItem("defaultWindowDimensions", JSON.stringify(dimensions))
getDefaultWindowDimensions: ->
{windowDimensions} = @getLoadSettings()
@@ -240,15 +238,21 @@ class Atom extends Model
console.warn "Error parsing default window dimensions", error
localStorage.removeItem("defaultWindowDimensions")
{width, height} = screen.getPrimaryDisplay().workAreaSize
dimensions ? {x: 0, y: 0, width: Math.min(1024, width), height: height}
if @isValidDimensions(dimensions)
dimensions
else
{width, height} = screen.getPrimaryDisplay().workAreaSize
{x: 0, y: 0, width: Math.min(1024, width), height}
restoreWindowDimensions: ->
windowDimensions = @state.windowDimensions ? @getDefaultWindowDimensions()
@setWindowDimensions(windowDimensions)
dimensions = @state.windowDimensions
unless @isValidDimensions(dimensions)
dimensions = @getDefaultWindowDimensions()
@setWindowDimensions(dimensions)
storeWindowDimensions: ->
@state.windowDimensions = @getWindowDimensions()
dimensions = @getWindowDimensions()
@state.windowDimensions = dimensions if @isValidDimensions(dimensions)
# Public: Get the load settings for the current window.
#
@@ -258,13 +262,20 @@ class Atom extends Model
deserializeProject: ->
Project = require './project'
startTime = Date.now()
@project ?= @deserializers.deserialize(@state.project) ? new Project(path: @getLoadSettings().initialPath)
@deserializeTimings.project = Date.now() - startTime
deserializeWorkspaceView: ->
Workspace = require './workspace'
WorkspaceView = require './workspace-view'
startTime = Date.now()
@workspace = Workspace.deserialize(@state.workspace) ? new Workspace
@workspaceView = new WorkspaceView(@workspace)
@deserializeTimings.workspace = Date.now() - startTime
@keymaps.defaultTarget = @workspaceView[0]
$(@workspaceViewParentSelector).append(@workspaceView)
@@ -273,6 +284,7 @@ class Atom extends Model
delete @state.packageStates
deserializeEditorWindow: ->
@deserializeTimings = {}
@deserializePackageStates()
@deserializeProject()
@deserializeWorkspaceView()
@@ -299,11 +311,6 @@ class Atom extends Model
@requireUserInitScript()
@menu.update()
$(window).on 'unload', =>
$(document.body).css('visibility', 'hidden')
@unloadEditorWindow()
false
@displayWindow()
unloadEditorWindow: ->
@@ -315,13 +322,18 @@ class Atom extends Model
@packages.deactivatePackages()
@state.packageStates = @packages.packageStates
@saveSync()
@workspaceView.remove()
@workspaceView = null
@project.destroy()
@windowEventHandler?.unsubscribe()
@keymaps.destroy()
@windowState = null
removeEditorWindow: ->
return if not @project and not @workspaceView
@workspaceView?.remove()
@workspaceView = null
@project?.destroy()
@project = null
@windowEventHandler?.unsubscribe()
loadThemes: ->
@themes.load()
@@ -426,7 +438,7 @@ class Atom extends Model
# width - The {Number} of pixels.
# height - The {Number} of pixels.
setSize: (width, height) ->
ipc.send('call-window-method', 'setSize', width, height)
@getCurrentWindow().setSize(width, height)
# Public: Set the position of current window.
#
@@ -439,6 +451,7 @@ class Atom extends Model
center: ->
ipc.send('call-window-method', 'center')
# Schedule the window to be shown and focused on the next tick.
#
# This is done in a next tick to prevent a white flicker from occurring
@@ -458,6 +471,12 @@ class Atom extends Model
app.emit('will-exit')
remote.process.exit(status)
setDocumentEdited: (edited) ->
ipc.send('call-window-method', 'setDocumentEdited', edited)
setRepresentedFilename: (filename) ->
ipc.send('call-window-method', 'setRepresentedFilename', filename)
# Public: Is the current window in development mode?
inDevMode: ->
@getLoadSettings().devMode
@@ -483,11 +502,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.
#
+7 -4
Ver Arquivo
@@ -135,7 +135,7 @@ class AtomApplication
# Registers basic application commands, non-idempotent.
handleEvents: ->
@on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath)
@on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath, safeMode: @focusedWindow()?.safeMode)
@on 'application:run-benchmarks', -> @runBenchmarks()
@on 'application:quit', -> app.quit()
@on 'application:new-window', -> @openPath(windowDimensions: @focusedWindow()?.getDimensions())
@@ -387,11 +387,13 @@ class AtomApplication
# Opens up a new {AtomWindow} to run specs within.
#
# options -
# :exitWhenDone - A Boolean that if true, will close the window upon
# :exitWhenDone - A Boolean that, if true, will close the window upon
# completion.
# :resourcePath - The path to include specs from.
# :specPath - The directory to load specs from.
runSpecs: ({exitWhenDone, resourcePath, specDirectory, logFile}) ->
# :safeMode - A Boolean that, if true, won't run specs from ~/.atom/packages
# and ~/.atom/dev/packages, defaults to false.
runSpecs: ({exitWhenDone, resourcePath, specDirectory, logFile, safeMode}) ->
if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath)
resourcePath = @resourcePath
@@ -402,7 +404,8 @@ class AtomApplication
isSpec = true
devMode = true
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, logFile})
safeMode ?= false
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, logFile, safeMode})
runBenchmarks: ->
try
+3 -2
Ver Arquivo
@@ -20,7 +20,7 @@ class AtomWindow
isSpec: null
constructor: (settings={}) ->
{@resourcePath, pathToOpen, initialLine, initialColumn, @isSpec, @exitWhenDone} = settings
{@resourcePath, pathToOpen, initialLine, initialColumn, @isSpec, @exitWhenDone, @safeMode} = settings
# Normalize to make sure drive letter case is consistent on Windows
@resourcePath = path.normalize(@resourcePath) if @resourcePath
@@ -105,7 +105,7 @@ class AtomWindow
type: 'warning'
buttons: ['Close Window', 'Reload', 'Keep It Open']
message: 'The editor has crashed'
detail: 'Please report this issue to atom@github.com'
detail: 'Please report this issue to https://github.com/atom/atom'
switch chosen
when 0 then @browserWindow.destroy()
when 1 then @browserWindow.restart()
@@ -138,6 +138,7 @@ class AtomWindow
when 'window:reload' then @reload()
when 'window:toggle-dev-tools' then @toggleDevTools()
when 'window:close' then @close()
when 'window:update-available' then @sendCommandToBrowserWindow(command, args...) # For spec testing
else if @isWebViewFocused()
@sendCommandToBrowserWindow(command, args...)
else
+24 -4
Ver Arquivo
@@ -1,3 +1,4 @@
https = require 'https'
autoUpdater = require 'auto-updater'
dialog = require 'dialog'
_ = require 'underscore-plus'
@@ -16,11 +17,12 @@ class AutoUpdateManager
constructor: (@version) ->
@state = IDLE_STATE
@feedUrl = "https://atom.io/api/updates?version=#{@version}"
# Only released versions should check for updates.
return if /\w{7}/.test(@version)
if process.platform is 'win32'
autoUpdater.checkForUpdates = => @checkForUpdatesShim()
autoUpdater.setFeedUrl "https://atom.io/api/updates?version=#{@version}"
autoUpdater.setFeedUrl @feedUrl
autoUpdater.on 'checking-for-update', =>
@setState(CHECKING_STATE)
@@ -39,7 +41,25 @@ class AutoUpdateManager
@setState(UPDATE_AVAILABLE_STATE)
@emitUpdateAvailableEvent(@getWindows()...)
@check(hidePopups: true)
# Only released versions should check for updates.
unless /\w{7}/.test(@version)
@check(hidePopups: true)
# Windows doesn't have an auto-updater, so use this method to shim the events.
checkForUpdatesShim: ->
autoUpdater.emit 'checking-for-update'
request = https.get @feedUrl, (response) ->
if response.statusCode == 200
body = ""
response.on 'data', (chunk) -> body += chunk
response.on 'end', ->
{notes, name} = JSON.parse(body)
autoUpdater.emit 'update-downloaded', null, notes, name
else
autoUpdater.emit 'update-not-available'
request.on 'error', (error) ->
autoUpdater.emit 'error', null, error.message
emitUpdateAvailableEvent: (windows...) ->
return unless @releaseVersion? and @releaseNotes
-4
Ver Arquivo
@@ -27,10 +27,6 @@ start = ->
event.preventDefault()
args.urlsToOpen.push(urlToOpen)
app.on 'open-url', (event, urlToOpen) ->
event.preventDefault()
args.urlsToOpen.push(urlToOpen)
app.on 'open-file', addPathToOpen
app.on 'open-url', addUrlToOpen
+56 -6
Ver Arquivo
@@ -40,13 +40,23 @@ class BufferedProcess
# containing the exit status (optional).
constructor: ({command, args, options, stdout, stderr, exit}={}) ->
options ?= {}
# Quick hack. Killing @process will only kill cmd.exe, and not the child
# process and will just orphan it. Does not escape ^ (cmd's escape symbol).
# Related to joyent/node#2318
if process.platform is "win32"
# Quote all arguments and escapes inner quotes
cmdArgs = args.map (arg) -> "\"#{arg.replace(/"/g, '\\"')}\""
cmdArgs.unshift("\"#{command}\"")
if args?
cmdArgs = args.map (arg) ->
if command in ['explorer.exe', 'explorer'] and /^\/[a-zA-Z]+,.*$/.test(arg)
# Don't wrap /root,C:\folder style arguments to explorer calls in
# quotes since they will not be interpreted correctly if they are
arg
else
"\"#{arg.replace(/"/g, '\\"')}\""
else
cmdArgs = []
if /\s/.test(command)
cmdArgs.unshift("\"#{command}\"")
else
cmdArgs.unshift(command)
cmdArgs = ['/s', '/c', "\"#{cmdArgs.join(' ')}\""]
cmdOptions = _.clone(options)
cmdOptions.windowsVerbatimArguments = true
@@ -105,8 +115,48 @@ class BufferedProcess
onLines(buffered) if buffered.length > 0
onDone()
# Kill all child processes of the spawned cmd.exe process on Windows.
#
# This is required since killing the cmd.exe does not terminate child
# processes.
killOnWindows: ->
parentPid = @process.pid
cmd = 'wmic'
args = [
'process'
'where'
"(ParentProcessId=#{parentPid})"
'get'
'processid'
]
wmicProcess = ChildProcess.spawn(cmd, args)
wmicProcess.on 'error', -> # ignore errors
output = ''
wmicProcess.stdout.on 'data', (data) -> output += data
wmicProcess.stdout.on 'close', =>
pidsToKill = output.split(/\s+/)
.filter (pid) -> /^\d+$/.test(pid)
.map (pid) -> parseInt(pid)
.filter (pid) -> pid isnt parentPid and 0 < pid < Infinity
for pid in pidsToKill
try
process.kill(pid)
@killProcess()
killProcess: ->
@process?.kill()
@process = null
# Public: Terminate the process.
kill: ->
return if @killed
@killed = true
@process.kill()
@process = null
if process.platform is 'win32'
@killOnWindows()
else
@killProcess()
undefined
+6 -1
Ver Arquivo
@@ -18,11 +18,16 @@ getCachedJavaScript = (cachePath) ->
try
fs.readFileSync(cachePath, 'utf8')
convertFilePath = (filePath) ->
if process.platform is 'win32'
filePath = "/#{path.resolve(filePath).replace(/\\/g, '/')}"
encodeURI(filePath)
compileCoffeeScript = (coffee, filePath, cachePath) ->
{js, v3SourceMap} = CoffeeScript.compile(coffee, filename: filePath, sourceMap: true)
# Include source map in the web page environment.
if btoa? and JSON? and unescape? and encodeURIComponent?
js = "#{js}\n//# sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//# sourceURL=#{filePath}"
js = "#{js}\n//# sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//# sourceURL=#{convertFilePath(filePath)}"
try
fs.writeFileSync(cachePath, js)
js
+13 -2
Ver Arquivo
@@ -103,8 +103,19 @@ class Config
# Returns the value from Atom's default settings, the user's configuration
# file, or `null` if the key doesn't exist in either.
get: (keyPath) ->
value = _.valueForKeyPath(@settings, keyPath) ? _.valueForKeyPath(@defaultSettings, keyPath)
_.deepClone(value)
value = _.valueForKeyPath(@settings, keyPath)
defaultValue = _.valueForKeyPath(@defaultSettings, keyPath)
if value?
value = _.deepClone(value)
valueIsObject = _.isObject(value) and not _.isArray(value)
defaultValueIsObject = _.isObject(defaultValue) and not _.isArray(defaultValue)
if valueIsObject and defaultValueIsObject
_.defaults(value, defaultValue)
else
value = _.deepClone(defaultValue)
value
# Public: Retrieves the setting for the given key as an integer.
#
+3 -2
Ver Arquivo
@@ -44,7 +44,7 @@ class ContextMenuManager
@addBySelector(selector, menuItem, {devMode})
buildMenuItem: (label, command) ->
if label is command is '-'
if command is '-'
{type: 'separator'}
else
{label, command}
@@ -60,7 +60,8 @@ class ContextMenuManager
# editor is in dev mode.
addBySelector: (selector, definition, {devMode}={}) ->
definitions = if devMode then @devModeDefinitions else @definitions
(definitions[selector] ?= []).push(definition)
if not _.findWhere(definitions[selector], definition) or _.isEqual(definition, {type: 'separator'})
(definitions[selector] ?= []).push(definition)
# Returns definitions which match the element and devMode.
definitionsForElement: (element, {devMode}={}) ->
+7 -5
Ver Arquivo
@@ -1,16 +1,18 @@
React = require 'react-atom-fork'
{div} = require 'reactionary-atom-fork'
{isEqualForProperties} = require 'underscore-plus'
module.exports =
CursorComponent = React.createClass
displayName: 'CursorComponent'
render: ->
{editor, screenRange, scrollTop, scrollLeft, defaultCharWidth} = @props
{top, left, height, width} = editor.pixelRectForScreenRange(screenRange)
top -= scrollTop
left -= scrollLeft
{pixelRect, defaultCharWidth} = @props
{top, left, height, width} = pixelRect
width = defaultCharWidth if width is 0
WebkitTransform = "translate3d(#{left}px, #{top}px, 0px)"
WebkitTransform = "translate(#{left}px, #{top}px)"
div className: 'cursor', style: {height, width, WebkitTransform}
shouldComponentUpdate: (newProps) ->
not isEqualForProperties(newProps, @props, 'pixelRect', 'defaultCharWidth')

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais