Comparar commits

...

2553 Commits

Autor SHA1 Mensagem Data
Kevin Sawicki 1f4359d429 Treat debugger statements as lint errors 2014-09-30 13:25:55 -07:00
Nathan Sobo f205fe81ce Actually update first-mate. Previous (51475fe231) updated atom-keymap.
Both were needed to introduce disposables, but I mixed up the commit
message in the previous commit.
2014-09-30 13:58:01 -06:00
Ben Ogle c74b1b971d Use isPlainObject() 2014-09-30 12:44:44 -07:00
Ben Ogle 54af7eced1 Handle empty config files + reset settings before applying user config
Closes #3664
2014-09-30 12:39:07 -07:00
Nathan Sobo 10f7a671c8 Merge pull request #3667 from atom/ns-deserializer-manager-disposables
Return disposables from DeserializerManager::add
2014-09-30 13:10:35 -06:00
Nathan Sobo 51475fe231 Upgrade first-mate to return Disposable from GrammarRegistry::addGrammar 2014-09-30 13:09:40 -06:00
Nathan Sobo 33a5ca30dc Use DeserializerManager::add disposable instead of ::remove in specs 2014-09-30 12:58:10 -06:00
Nathan Sobo df1ae64f62 Deprecate DeserializerManager::remove 2014-09-30 12:58:10 -06:00
Nathan Sobo 83710ed254 📝 Rename classes param to deserializers and update docs 2014-09-30 12:58:10 -06:00
Nathan Sobo 8cb8f09803 Return a Disposable instance from DeserializerManager::add 2014-09-30 12:58:10 -06:00
Kevin Sawicki ff0a7be48a Upgrade to settings-view@0.148 2014-09-30 11:18:50 -07:00
Nathan Sobo 5e6e3c8d72 Merge pull request #3655 from atom/ns-menu-disposables
Return disposables from MenuManager::add and add specs
2014-09-30 12:05:11 -06:00
Nathan Sobo dfc502b9a0 Merge pull request #3663 from atom/bo-subscribe-editor-commands
Subscribe to commands in TextEditorComponent so they are unsubscribed!
2014-09-30 10:56:05 -06:00
Ben Ogle a8d93f9cf4 Spec for unsubscribing from commands 2014-09-30 09:45:55 -07:00
Ben Ogle 50cf5f3e95 Subscribe to editor commands
We need to unsubscribe when the editor is removed!

Closes #3651
2014-09-30 09:33:50 -07:00
Kevin Sawicki 5a9b34b31a ! -> ~ 2014-09-30 09:32:03 -07:00
Kevin Sawicki 3efaeff669 🍎 Install via move instead of copy
This fixes the issue with the icon not showing up on OS X Mavericks
when building.

It seems that copying it to /Application file by file causes the icon to not
show up while moving it atomically there does.
2014-09-30 09:15:55 -07:00
Ben Ogle 443df29236 Upgrade find and replace to have cmd-d undo and skip 2014-09-29 17:26:51 -07:00
Ben Ogle 05b3f16eb2 Merge pull request #3613 from atom/bo-config-types
Support JSON Schema in Config
2014-09-29 17:23:54 -07:00
Ben Ogle b54deccfae String type must be strict.
It makes sense to coerce from more general -> more specific data types.
eg. string -> int, etc. But coercing the other way is problematic
in the case of chaining because the more general type will swallow the
specific type. eg. Setting `false` on type: [‘string’, ‘boolean’] will 
coerce the boolean to a string, and will never allow the value to be
a boolean.
2014-09-29 16:09:49 -07:00
Ben Ogle 9808264b7f Fix onDidChange usage 2014-09-29 16:09:49 -07:00
Ben Ogle f3ed3dc357 Fix doc to match implementation 2014-09-29 16:09:49 -07:00
Ben Ogle 33b25c7312 Use new config callback arguments 2014-09-29 16:09:49 -07:00
Ben Ogle 454f9c4c65 Rename config-defaults -> config-schema 2014-09-29 16:09:49 -07:00
Ben Ogle 1b506673bb 📝 update 2014-09-29 16:09:49 -07:00
Ben Ogle 5651ebbb48 always set, only emit when values differ 2014-09-29 16:09:49 -07:00
Ben Ogle a7185a894f Fix specs 2014-09-29 16:09:49 -07:00
Ben Ogle 16c7fd3d70 Add spec for update event on load 2014-09-29 16:09:49 -07:00
Ben Ogle 98290b31ab Rework defaults and user loading to notify per path 2014-09-29 16:09:48 -07:00
Ben Ogle 08b138997d Change the onDidChange / observe arguments
Support passing no keypath
2014-09-29 16:09:48 -07:00
Ben Ogle 1f7aee00ac function names to the imperative mood
http://en.wikipedia.org/wiki/Imperative_mood
2014-09-29 16:09:48 -07:00
Ben Ogle 3977596084 Validators -> enforcers 2014-09-29 16:09:48 -07:00
Ben Ogle 804d0d9911 Doc 💄 2014-09-29 16:09:48 -07:00
Ben Ogle 04d045227a rename to config-defaults 2014-09-29 16:09:48 -07:00
Ben Ogle 4e1d13ceea is plain object 2014-09-29 16:09:48 -07:00
Ben Ogle ef19e925e9 Strings accept numbers too 2014-09-29 16:09:48 -07:00
Ben Ogle 2c1fa19e27 Update spec strings 2014-09-29 16:09:48 -07:00
Ben Ogle 11fad1bd12 Moar 📝 2014-09-29 16:09:48 -07:00
Ben Ogle 1408d69641 Fix up message strings 2014-09-29 16:09:48 -07:00
Ben Ogle 38d2303857 Clean up docs in creating a package 2014-09-29 16:09:48 -07:00
Ben Ogle 96207ffbdb Update error messages to read good 2014-09-29 16:09:47 -07:00
Ben Ogle fcf2143e70 isPlainObject 2014-09-29 16:09:47 -07:00
Ben Ogle 3a8f842de3 Remove uses of toggle 2014-09-29 16:09:47 -07:00
Ben Ogle 452e34db90 Remove deprecations for push / remove / unshift at keypath 2014-09-29 16:09:47 -07:00
Ben Ogle 8b39ce77b1 We’ll always have validators for a type. No check 2014-09-29 16:09:47 -07:00
Ben Ogle 604158647a line height can be a string or a number 2014-09-29 16:09:47 -07:00
Ben Ogle 22fb5adda9 Remove deprecated calls for config.observe .. callNow: false in core 2014-09-29 16:09:47 -07:00
Ben Ogle e607d45f0d Remove instances of getPositiveInt() 2014-09-29 16:09:47 -07:00
Ben Ogle 94d470002b Update doc strings 2014-09-29 16:09:47 -07:00
Ben Ogle 33d4ace8e9 📝 more docs for Config 2014-09-29 16:09:47 -07:00
Ben Ogle 800dee09ba Make boolean schema validator a little tighter 2014-09-29 16:09:47 -07:00
Ben Ogle 6b4ce902ba Undefined in Config::set always unsets the value 2014-09-29 16:09:46 -07:00
Ben Ogle c6f7c75c8a Update method doc strings for clarity 2014-09-29 16:09:46 -07:00
Ben Ogle cb1f8e02aa Return the value from restoreDefault 2014-09-29 16:09:46 -07:00
Ben Ogle 885a19492c Rearrange managing settings section 2014-09-29 16:09:46 -07:00
Ben Ogle 8f738aae53 Fix up Config doc string 2014-09-29 16:09:46 -07:00
Ben Ogle f09e58b434 Update config docs 2014-09-29 16:09:46 -07:00
Ben Ogle 98e828b337 Move default schema into config-default-schema.coffee 2014-09-29 16:09:46 -07:00
Ben Ogle 03a9a67ba8 Move spec 2014-09-29 16:08:04 -07:00
Ben Ogle beb96cc025 💄 2014-09-29 16:08:04 -07:00
Ben Ogle ae76bd6c96 Do not allow infinity in number types 2014-09-29 16:08:04 -07:00
Ben Ogle 694dd05e7b Make warn messages way better. 2014-09-29 16:08:04 -07:00
Ben Ogle 662fc443dc Fix specs 2014-09-29 16:08:04 -07:00
Ben Ogle 0fc773c1fc Warn when loading bogus values from the user's config 2014-09-29 16:08:03 -07:00
Ben Ogle aa5b0ce41f Remove linter errors, warn when bad value 2014-09-29 16:08:03 -07:00
Ben Ogle 832b4ae4d8 Fix specs 2014-09-29 16:08:03 -07:00
Ben Ogle af1bdaf901 Dont fail when there are thigns to set with array and object types 2014-09-29 16:08:03 -07:00
Ben Ogle 969ca048e8 Fix specs 2014-09-29 16:08:03 -07:00
Ben Ogle 0d2fdec326 Fix specs in config 2014-09-29 16:08:03 -07:00
Ben Ogle f57dbfd9f5 Deprecate configDefaults in packages. 2014-09-29 16:08:03 -07:00
Ben Ogle fc3ba775c8 Support schemas in packages 2014-09-29 16:08:03 -07:00
Ben Ogle 9b07158337 Add items schemas to arrays in workspaceView 2014-09-29 16:08:03 -07:00
Ben Ogle 0bb8821644 Editor config uses a schema 2014-09-29 16:08:03 -07:00
Ben Ogle 5fdf3f894c Load the config from Atom class so as not to duplicate 2014-09-29 16:07:02 -07:00
Ben Ogle 5bf09716ef convert the workspace config to use a schema 2014-09-29 16:06:27 -07:00
Ben Ogle 9fff544955 Fix specs 2014-09-29 16:05:24 -07:00
Ben Ogle 6a29630c82 Deprecate the getInt and getPositiveInt methods 2014-09-29 16:05:24 -07:00
Ben Ogle 74ba3c6a49 Add config section to creating a package 2014-09-29 16:05:24 -07:00
Ben Ogle 601c603bbe 📝 2014-09-29 16:05:24 -07:00
Ben Ogle 9fbbd1e59b Back to getSchema 2014-09-29 16:05:24 -07:00
Ben Ogle ba4df1b002 Pass a message to the errors thrown by validators 2014-09-29 16:05:24 -07:00
Ben Ogle 2c1190b552 Validate enum keywords 2014-09-29 16:05:24 -07:00
Ben Ogle 9ff976021e Rename typeFilters to schemaValidators; add typeless validators 2014-09-29 16:05:24 -07:00
Ben Ogle 5e9a269278 getSchema -> schemaForKeyPath 2014-09-29 16:05:24 -07:00
Ben Ogle 18e0adbfa8 Fix linter error 2014-09-29 16:05:24 -07:00
Ben Ogle f7f28e7995 Handle minimum and maximum keywords on number types 2014-09-29 16:05:24 -07:00
Ben Ogle ac67430926 Handle bad values in number type 2014-09-29 16:05:23 -07:00
Ben Ogle 409b5536e1 Support arrays 2014-09-29 16:05:23 -07:00
Ben Ogle 2526ba0efb Add an object filter 2014-09-29 16:05:23 -07:00
Ben Ogle 1a8c5ba551 Handle validation of schema types 2014-09-29 16:05:23 -07:00
Ben Ogle f909d32826 Support more types 2014-09-29 16:05:23 -07:00
Ben Ogle d0bb49dea0 Add type filter system to config 2014-09-29 16:05:23 -07:00
Ben Ogle 02e87555f4 Handle schema loading 2014-09-29 16:05:23 -07:00
Ben Ogle a84dd69f55 Deprecate unused / unnecessary methods 2014-09-29 16:05:23 -07:00
Ben Ogle a79c015774 Update ::observe and add ::onDidChange 2014-09-29 16:05:23 -07:00
Ben Ogle 9e46ab1b48 Reorder config methods for easier digestion 2014-09-29 16:05:23 -07:00
Kevin Sawicki 69f24a157a Upgrade to language-coffee-script@0.35 2014-09-29 13:41:00 -07:00
Kevin Sawicki ea75636e44 Use long options 2014-09-29 13:26:36 -07:00
Kevin Sawicki e7ad9ae15a Add --deep codesign option for 10.9.5 2014-09-29 13:22:55 -07:00
Kevin Sawicki 0499ee65a4 Upgrade to tabs@0.54 2014-09-29 11:07:40 -07:00
Kevin Sawicki c56babec8d Add split commands to editor context menu
Refs atom/tabs#85
2014-09-29 11:07:19 -07:00
Nathan Sobo f6f891fa14 Construct test instance of MenuManager in spec 2014-09-29 11:45:01 -06:00
Nathan Sobo 2f93032a37 Don’t add duplicate items to the same menu 2014-09-29 11:11:36 -06:00
Nathan Sobo c058b44a1b 💄 spec description 2014-09-29 11:11:10 -06:00
Nathan Sobo 81a7f65832 📝 Update docs 2014-09-29 10:37:19 -06:00
Nathan Sobo bbeb0b5919 Return disposables from MenuManager which can be used to remove menus 2014-09-29 10:34:50 -06:00
Kevin Sawicki 60d34576d5 Upgrade to bracket-matcher@0.61 2014-09-29 09:20:35 -07:00
Ben Ogle 1539a90ee7 📝 2014-09-26 17:31:47 -07:00
Ben Ogle b958286d22 Click to expand stack traces 2014-09-26 17:31:09 -07:00
Kevin Sawicki 6ce13a9c3e Prepare 0.133 2014-09-26 15:30:40 -07:00
Kevin Sawicki d1ba8b0140 Only test on Mac OS X for now 2014-09-26 15:17:35 -07:00
Kevin Sawicki f4b23b801d Only sign setup.exe when present 2014-09-26 14:53:20 -07:00
Kevin Sawicki 14c8c463fb Don't build installers yet 2014-09-26 14:39:16 -07:00
Nathan Sobo b5fc4aec84 Re-render component when EditorView is reattached
Fixes #3640
2014-09-26 15:15:23 -06:00
Ben Ogle 1f2fc4bf00 Merge pull request #3619 from lee-dohm/scroll-past-end
Add ability to scroll past the end of the file
2014-09-26 11:47:58 -07:00
Ben Ogle 3601d113ad Deactivate and unload all packages 2014-09-26 11:21:42 -07:00
Kevin Sawicki 6a81f3c6ce Upgrade to language-sass@0.22 2014-09-26 08:34:46 -07:00
Lee Dohm 00baedbdf9 Add specs for editor.scrollPastEnd behavior 2014-09-25 23:05:47 -07:00
Lee Dohm 2c3bec7468 Add ability to scroll past the end of the file
Fixes #3592
2014-09-25 23:04:54 -07:00
Kevin Sawicki 409816ef07 Upgrade to settings-view@0.147 2014-09-25 16:26:11 -07:00
Ben Ogle 8871d45227 Merge pull request #3603 from atom/bo-rename-editor
Rename Editor -> TextEditor
2014-09-25 15:27:13 -07:00
Ben Ogle c5fa8fdf11 Fix spec 2014-09-25 15:15:50 -07:00
Ben Ogle e060e08f93 Deactivate and unload lang packages after use 2014-09-25 15:14:30 -07:00
Ben Ogle 039afff1de Unload the coffee grammar after using 2014-09-25 15:14:29 -07:00
Ben Ogle d33bd291dd Deactivate / unload packages after use
This was messing with other specs!
2014-09-25 15:14:29 -07:00
Ben Ogle b422c7a678 Recommend GitRepository. Ugh 2014-09-25 15:14:29 -07:00
Ben Ogle 55d243215a Deprecate requiring EditorView 2014-09-25 15:14:29 -07:00
Ben Ogle 0bc2b45200 Rename spec files 2014-09-25 15:14:29 -07:00
Ben Ogle 683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
Ben Ogle 82c53b539a editor.coffee -> text-editor.coffee 2014-09-25 15:14:29 -07:00
Ben Ogle c2f44efe31 editor-view -> text-editor-view 2014-09-25 15:14:29 -07:00
Ben Ogle b3038eb968 editor-component -> text-editor-component 2014-09-25 15:14:29 -07:00
Kevin Sawicki 3694111211 Upgrade to bracket-matcher@0.60 2014-09-25 15:09:34 -07:00
Paul Betts bf2d307cbe Merge pull request #3635 from atom/edit-accelerators
Fix Copy / Cut's accelerators on Win32
2014-09-25 13:47:33 -07:00
Paul Betts 38016b205c Fix Copy / Cut's accelerators
Copy/Cut/Paste always have the same accelerator in every app
2014-09-25 13:40:09 -07:00
Kevin Sawicki b4dcd019c1 Merge pull request #3631 from atom/ks-set-default-path-to-open-on-linux
Set default path to open on linux
2014-09-25 10:57:52 -07:00
Kevin Sawicki 13a5bfd1dd Set default path on both files and folders 2014-09-25 09:45:54 -07:00
Kevin Sawicki 9e0c4d1fb6 Only set default path when opening files 2014-09-25 09:35:25 -07:00
Kevin Sawicki cabcf19297 🐧 Default to project path in open dialog 2014-09-25 09:33:17 -07:00
Kevin Sawicki 9aa7331e6e Upgrade to tabs@0.53 2014-09-25 09:10:27 -07:00
Kevin Sawicki 3daf505f3e Upgrade to settings-view@0.146 2014-09-24 16:03:05 -07:00
Paul Betts cd92f882bf Merge pull request #3447 from atom/squirrel-installer
Build a Squirrel installer as part of CI build
2014-09-24 15:50:30 -07:00
Kevin Sawicki 707ac0b043 Upgrade to metrics@0.36 2014-09-24 15:45:19 -07:00
Paul Betts 4a812707d8 Merge remote-tracking branch 'origin/master' into squirrel-installer 2014-09-24 15:31:52 -07:00
Paul Betts f2ef7beae6 Include all PAK files 2014-09-24 15:07:41 -07:00
Kevin Sawicki c64a4dd70f Upgrade to tree-view@0.127 2014-09-24 14:58:57 -07:00
Paul Betts 3ab0b16923 Add a loading GIF that will display during initial install 2014-09-24 14:51:25 -07:00
Paul Betts fac72fbf10 Update to Squirrel 0.4.95 2014-09-24 14:51:24 -07:00
Nathan Sobo 7d71eeedf4 Break command dispatch as soon as currentTarget is null 2014-09-24 15:28:02 -06:00
Nathan Sobo 6d55bab4c8 Fix CommandRegistry::get/restoreSnapshot
I didn’t realize that deepClone was not handling functions correctly.
I’ve implemented clone manually to the exact depth needed instead.
2014-09-24 15:26:38 -06:00
Nathan Sobo d506ccbaad Merge pull request #3611 from atom/ns-activation-commands
Activation commands
2014-09-24 15:06:52 -06:00
Kevin Sawicki 8275ddd882 Catch errors thrown watching config file
Closes #3617
2014-09-24 13:54:27 -07:00
Nathan Sobo b7765d9416 Process commands invoked with jQuery trigger in CommandRegistry
Especially in specs, trigger has been used to invoke events. jQuery does
not invoke native listeners in this situation, so we use ::on to listen
for them instead. If we didn’t handle the event with a native capture
handler, we’ll still support invoking via trigger.
2014-09-24 14:34:29 -06:00
Nathan Sobo 47f8f7eb11 Switch specs to use activationCommands instead of activationEvents
The activationEvents are converted to the same format as
activationCommands, and that property will be deprecated.
2014-09-24 14:34:29 -06:00
Nathan Sobo 63181a17c8 Support activationCommands field in package.json
This field mandates selectors in its structure and closely matches the
API of `atom.commands.add`. It will supplant `activationEvents` moving
forward.
2014-09-24 14:34:28 -06:00
Nathan Sobo c71457e9d4 Default selector to .workspace when subscribing to activation events 2014-09-24 14:34:28 -06:00
Nathan Sobo 7d31b17273 Use the CommandRegistry to register activation event listeners
Commands registered with the command registry will always be handled
first, so as long as we disable any listeners in the registry that were
already invoked for the current command, we don’t need to disable jQuery
methods before replaying the command after activating the package.

This commit adds the ability to call .disableInvokedListeners on the
event passed to the command listeners. This returns a function which
can be called to reenable them.
2014-09-24 14:34:28 -06:00
Nathan Sobo 066f6bf03c Forward stop[Immediate]Propagation to original event in CommandRegistry
Previously, stopping propagation would work on the synthetic bubbling
phase of the command registry itself, but the original event would
continue to propagate which is counterintuitive.
2014-09-24 14:34:28 -06:00
Nathan Sobo 40f8b990d0 Handle dispatching non-existent commands 2014-09-24 14:34:28 -06:00
Nathan Sobo a492596f7f Allow atom.commands to participate in activationEvents
* Activation events can be handled via atom.commands
* Pre-existing listeners registered via atom.commands are disabled when
  replaying events for the activated package.
2014-09-24 14:34:28 -06:00
Nathan Sobo 2df5957f9b Restore commands after each spec
This commit adds the ability to get and restore snapshots of command
listeners. Whatever commands are installed before specs begin are
preserved, but commands added during specs are always cleared away.
2014-09-24 14:34:28 -06:00
Nathan Sobo a7196ec906 Dispatch activation commands with native DOM apis in specs 2014-09-24 14:34:28 -06:00
Nathan Sobo c094b7a0ef Extract package-manager-specs from atom-specs 2014-09-24 14:34:28 -06:00
Nathan Sobo 09b5ac887a Return whether a dispatched command matched a listener 2014-09-24 14:34:28 -06:00
Nathan Sobo 67ff8f4382 Don’t clear commands after specs
Commands are typically registered once at eval time. Clearing them
means that commands aren’t available except in the first spec.
2014-09-24 14:34:27 -06:00
Nathan Sobo 0c9fd46030 Add CommandRegistry::dispatch for tests 2014-09-24 14:34:27 -06:00
Nathan Sobo cf4a7c22ee Upgrade command-palette for spec fixes 2014-09-24 14:33:37 -06:00
Kevin Sawicki 30f04360dd Prepare 0.132 2014-09-24 11:03:20 -07:00
Kevin Sawicki 371e25af69 Disable deprecations unless in dev/spec mode
These are currently adding ~200ms to startup so temporarily disable
until the grim performance is improved and/or core and bundled packages
are updated to not call deprecated APIs.
2014-09-24 10:24:27 -07:00
Nathan Sobo 7fdffdd201 Upgrade atom-keymap 2014-09-24 11:04:56 -06:00
Kevin Sawicki 475fd07790 Resolve buildDir before it is used in other join calls 2014-09-24 09:48:56 -07:00
Kevin Sawicki 9e99cf03ea Upgrade to bracket-matcher@0.59 2014-09-24 09:18:58 -07:00
Kevin Sawicki b2c74ac249 Upgrade to apm 0.97 2014-09-23 17:24:51 -07:00
Kevin Sawicki daa2c77321 Merge pull request #3610 from postcasio/master
Don't override antialiasing in markdown
2014-09-23 17:07:37 -07:00
Kevin Sawicki 3f15338cad Upgrade to language-todo@0.12 2014-09-23 15:47:22 -07:00
Kevin Sawicki 00f67122c4 📝 Mark atom.commands experimental
The CommandRegistry class is still experimental and 404-ing in the
API docs on atom.io
2014-09-23 14:19:10 -07:00
Kevin Sawicki df3f884ada Resolve build and install directory paths
Closes #3600
2014-09-23 13:09:22 -07:00
Kevin Sawicki 85bf163f76 Merge pull request #3599 from atom/ks-remove-lintian-errors
Remove lintian errors
2014-09-23 12:59:35 -07:00
Kevin Sawicki c6d6fb3b7a Add libc6 to Depends section 2014-09-23 12:19:54 -07:00
Kevin Sawicki 26f3bde0e6 Add more lintian overrides 2014-09-23 12:19:54 -07:00
Kevin Sawicki 97b742cb1d Add initial lintian overrides 2014-09-23 12:19:54 -07:00
Kevin Sawicki 4c3ac8e6ec Add python dependency 2014-09-23 12:19:54 -07:00
Kevin Sawicki 0be03c8d9c Copy LICENSE.md to /usr/share/doc/atom/copyright 2014-09-23 12:19:54 -07:00
Kevin Sawicki 0bdddc955f Remove executable bit from .node files 2014-09-23 12:19:54 -07:00
Kevin Sawicki ad9b5e5b8d Add extended description 2014-09-23 12:19:54 -07:00
Kevin Sawicki c178ac3aa6 Run dpkg-deb using fakeroot 2014-09-23 12:19:54 -07:00
Kevin Sawicki 6b23479c3f Use FILE_MODE variable 2014-09-23 12:19:54 -07:00
Kevin Sawicki c4e3b76070 Quote deleted directory 2014-09-23 12:19:53 -07:00
Nathan Sobo 3dbaa0679b Merge pull request #3587 from atom/ns-workspace-view-providers
Add view provider API to Workspace
2014-09-23 13:08:00 -06:00
Nathan Sobo 366714aa3d Upgrade atom-keymap for dvorak-qwerty fix 2014-09-23 13:00:53 -06:00
Nathan Sobo 1077a59450 Upgrade snippets to support multiple cursors 2014-09-23 12:38:47 -06:00
Ben Ogle 3bc115a7a0 Merge pull request #3606 from atom/bo-model-placeholder-text
Model EditorView::setPlaceholderText
2014-09-23 11:20:23 -07:00
Kevin Sawicki 71b3ab3ae6 Prepare 0.131 2014-09-23 10:51:23 -07:00
Ben Ogle 169a5de6a3 not.toBeDefined -> toBeUndefined 2014-09-23 10:38:38 -07:00
Kevin Sawicki 90ff3f585d Always pass specs on Windows CI 2014-09-23 10:03:14 -07:00
Kevin Sawicki 2a7b73898e Upgrade to bracket-matcher@0.58 2014-09-23 09:08:26 -07:00
Kevin Sawicki 7375b32fb3 Upgrade to bracket-matcher@0.57 2014-09-23 08:51:34 -07:00
postcasio a615c3e081 Don't override antialiasing in markdown 2014-09-23 15:35:54 +01:00
Ben Ogle d4f7e710f4 Reorder properties by usage 2014-09-22 17:28:20 -07:00
Kevin Sawicki 02d34b3ba9 Use .ico file from repo 2014-09-22 17:25:17 -07:00
Kevin Sawicki 69217b2d8f Use .ico file from tag 2014-09-22 17:24:17 -07:00
Ben Ogle 4606ce2d50 Model setPlaceholderText
Less dependence on the editorView!
2014-09-22 17:21:42 -07:00
Kevin Sawicki 1dc5593380 📝 Single # in comments 2014-09-22 17:20:38 -07:00
Kevin Sawicki 42e0f83259 Add missing space 2014-09-22 17:18:15 -07:00
Kevin Sawicki 428532cd24 Remove stray if 2014-09-22 17:17:15 -07:00
Kevin Sawicki 7581832658 💄 2014-09-22 17:13:05 -07:00
Kevin Sawicki c61c07f07d Use path.extname 2014-09-22 17:09:55 -07:00
Kevin Sawicki abe7dde205 Use grunt.file.readJSON 2014-09-22 17:07:52 -07:00
Kevin Sawicki 4bc49b82ef 💄 2014-09-22 17:07:00 -07:00
Kevin Sawicki de1fd977e0 Use grunt APIs for read, write, and delete 2014-09-22 17:06:23 -07:00
Kevin Sawicki 32143cfbdb Upgrade to symbols-view@0.66 2014-09-22 16:58:25 -07:00
Ben Ogle 2e4fda323e Merge pull request #3605 from atom/bo-fix-cursor-events
Make cursor / selection events consistent
2014-09-22 16:44:42 -07:00
Ben Ogle 021208d933 Update Cursor::onDidChangePosition doc string 2014-09-22 16:12:51 -07:00
Ben Ogle 688b209000 Update doc string in Selection::onDidChangeRange 2014-09-22 16:12:19 -07:00
Ben Ogle 91a443e7cb Update onDidChangeSelectionRange doc string 2014-09-22 16:09:32 -07:00
Ben Ogle c62fb26001 onDidChangeSelectionRange emits object with ranges + selection 2014-09-22 16:08:12 -07:00
Ben Ogle 3134364362 Add cursor to the docs 2014-09-22 15:50:47 -07:00
Ben Ogle e5c03e139a Only pass event to the editor 2014-09-22 15:50:40 -07:00
Ben Ogle 5083c18c84 Add cursor to onDidChangeCursorPosition event object 2014-09-22 15:37:41 -07:00
Kevin Sawicki 4260eaa329 Merge pull request #3585 from deiga/patch-1
Add matching of Atom.app more stable
2014-09-22 15:06:50 -07:00
Kevin Sawicki dc3a3225b3 Remove logging from specs 2014-09-22 15:00:06 -07:00
Kevin Sawicki 95087b8996 Git -> GitRepository 2014-09-22 14:54:01 -07:00
Kevin Sawicki a06fba75b8 Upgrade to bracket-matcher@0.56 2014-09-22 14:50:25 -07:00
Ben Ogle d727e440aa Merge pull request #3601 from atom/bo-rename-git
Rename Git -> GitRepository
2014-09-22 13:43:04 -07:00
Paul Betts afce21f37d Merge remote-tracking branch 'origin/master' into squirrel-installer 2014-09-22 11:19:54 -07:00
Ben Ogle 6e8cfba440 nof 2014-09-22 11:07:53 -07:00
Ben Ogle 7a429b024e Use GitRepository rather than Git 2014-09-22 11:07:41 -07:00
Ben Ogle 84425f238a Rename git -> git-repository 2014-09-22 11:07:19 -07:00
Ben Ogle c62b7cc710 Deprecate requiring Git 2014-09-22 11:01:14 -07:00
Kevin Sawicki 39d3724860 Handle error events in spawned processes
Refs #3600
2014-09-22 10:57:42 -07:00
Kevin Sawicki 9eed8a206a Upgrade to first-mate@2.1.2 2014-09-22 10:47:56 -07:00
Paul Betts 5230d040eb Clear the releases dir for now 2014-09-22 10:47:27 -07:00
Kevin Sawicki ec0bcd90a6 Upload correct verison of .deb file 2014-09-22 10:38:56 -07:00
Kevin Sawicki 08871989e2 Correct process arch value 2014-09-22 10:35:52 -07:00
Kevin Sawicki c94b03f13d Run mkdeb task right before publishing 2014-09-22 10:33:29 -07:00
Kevin Sawicki 481653ff60 🍎 Insert newline with alt-enter and shift-enter
Closes #3588
2014-09-22 10:26:24 -07:00
Nathan Sobo ddb85abe77 Don’t add the same editor to two different panes in spec 2014-09-19 16:30:37 -06:00
Nathan Sobo 55cce48af1 Throw an exception if the same pane item is added twice in the workspace 2014-09-19 16:24:13 -06:00
Nathan Sobo d3239473b3 📝 Document Workspace::addViewProvider 2014-09-19 16:24:13 -06:00
Nathan Sobo fa103d42d0 Delegate Workspace::addViewProvider to its ::viewRegistry 2014-09-19 16:24:13 -06:00
Nathan Sobo ecbf2b708c Make ::getView essential because otherwise the section is empty 2014-09-19 16:24:13 -06:00
Nathan Sobo d344adc21e Allow view providers to specify a createView factory method
If present, it will be called with the model object instead of
instantiating the view constructor directly and assigning a model on it.
This gives users more flexibility when constructing views.
2014-09-19 16:24:13 -06:00
Nathan Sobo 74d772f069 Rename view/modelClass to view/modelConstructor in view provider specs
It’s a more technically correct term. You use a class keyword to declare
these things, but the actual objects you pass around to talk about them
are constructor functions.
2014-09-19 16:24:13 -06:00
Nathan Sobo e2e804483f Return disposable from ViewRegistry::addViewProvider 2014-09-19 16:24:13 -06:00
Nathan Sobo e084e13ea3 📝 Document Workspace::getView 2014-09-19 16:24:13 -06:00
Nathan Sobo b5499247b3 Use view providers to build views if a matching provider is available 2014-09-19 16:24:13 -06:00
Nathan Sobo 54378b11d4 Isolate ViewRegistry specs 2014-09-19 16:24:12 -06:00
Nathan Sobo 21802ddb7c Upgrade background-tips to fix spec failure 2014-09-19 16:24:12 -06:00
Nathan Sobo 20e08323c1 Use the ViewRegistry to construct pane item views 2014-09-19 16:24:12 -06:00
Nathan Sobo 0877721ce9 Construct PaneAxisViews and PaneViews via ViewRegistry 2014-09-19 16:24:12 -06:00
Nathan Sobo 2b86297a0b Extract a ViewRegistry that can be shared amongst Workspace objects 2014-09-19 16:24:12 -06:00
Nathan Sobo 53bd1c8958 Use Workspace::getView to build PaneContainerView 2014-09-19 16:24:12 -06:00
Nathan Sobo 7f41be3103 Use atom.workspace.getView to construct WorkspaceViews
It returns the root DOM node of the workspace. Eventually this will
be a custom element but for now it’s just a DOM node with a
__spacePenView reference on it.
2014-09-19 16:24:12 -06:00
Nathan Sobo 7baa3b6f09 Start on Workspace::getView 2014-09-19 16:24:12 -06:00
Nathan Sobo bac99222f3 Force scrollbars to be GPU layers when acceleration is enabled
Fixes #3559

For some reason, Chromium 37 is not compositing scrollbars correctly on
secondary monitors in OS X. They’re invisible when the lines layer
extends beneath the scrollbars unless we apply this style.
2014-09-19 15:10:04 -06:00
Kevin Sawicki d6842dc8a2 Upgrade to language-xml@0.21 2014-09-19 09:56:11 -07:00
Kevin Sawicki 8b651328d2 Upgrade to settings-view@0.145 2014-09-19 09:45:25 -07:00
Kevin Sawicki 17838f832d 📝 Add installing on debian steps 2014-09-19 09:36:30 -07:00
Kevin Sawicki 9e686c11e4 Upgrade to apm 0.96 2014-09-19 09:29:45 -07:00
Timo Sand 8932eba0bf Add matching of Atom.app more stable
I have this file on my Mac `/Users/timosand/Library/Application Support/com.github.atom.ShipIt/update.85PyXs3/Atom.app` and my `mdfind` returns it. It seems to be a common one, so I thought to remove it from the list to be sure that it selects the right Atom.app
2014-09-19 07:48:21 +03:00
Ben Ogle 5cc62b2429 Merge pull request #3583 from atom/bo-final-docs-pass
Final docs pass
2014-09-18 18:45:18 -07:00
Ben Ogle e5096d8190 Data -> Details 2014-09-18 18:40:46 -07:00
Ben Ogle 2af699f35e Rename cursor sections 2014-09-18 17:27:08 -07:00
Kevin Sawicki b1f48338cd Upgrade to apm 0.95 2014-09-18 17:26:46 -07:00
Ben Ogle 7632e5dd40 Reorg decoration 2014-09-18 17:24:24 -07:00
Ben Ogle 9f1aabed0a Reorg Editor a bit based on conversations
Move heavier used sections near the top of the file. Make some of the
single extended methods public.
2014-09-18 17:20:18 -07:00
Ben Ogle 33827d1dc8 Upgrade text-buffer for better docs 2014-09-18 16:59:06 -07:00
Ben Ogle 29f53d4432 PaneView is private 2014-09-18 16:52:56 -07:00
Ben Ogle f407ca3a0c saveAll is private 2014-09-18 16:52:11 -07:00
Ben Ogle 2d3ea244ee Opener stuff is essential 2014-09-18 16:51:59 -07:00
Ben Ogle 97931ff259 Move observePaneItems and onDidChangePaneItem to essential 2014-09-18 16:51:30 -07:00
Ben Ogle d02c3e0d62 WorkspaceView is extended 2014-09-18 16:45:13 -07:00
Ben Ogle e2d9e5bd74 Make focusing other pane views from workspaceView private 2014-09-18 16:44:49 -07:00
Kevin Sawicki 0b03c89010 Upgrade to settings-view@0.144 2014-09-18 16:43:47 -07:00
Ben Ogle 69f54b90dc Clean up atom details section 2014-09-18 16:43:13 -07:00
Ben Ogle 7c483f989f Clean up marker 2014-09-18 16:43:00 -07:00
Kevin Sawicki c89bafb66e Refresh horizontal scrollbar DOM node
Previously the vertical scrollbar's DOM node was used as the
horizontal node causing the horizontal scrollbar to not refresh
properly

Closes #3511
2014-09-18 16:26:40 -07:00
Kevin Sawicki ee093d1709 Merge pull request #3582 from atom/ks-dont-allow-focused-specs-on-ci
Fail focused specs on CI
2014-09-18 16:16:17 -07:00
Ben Ogle 155d4ce733 Merge pull request #3569 from atom/bo-proper-doc-marker
Rename DisplayBufferMarker to Marker
2014-09-18 16:14:35 -07:00
Kevin Sawicki 021278e902 Always auto indent at least one hard tab
Previously when the delta between the suggested and current indent level
was greater than zero but less than one, no text would be inserted since
Editor::buildIndentString returns an empty string for levels less than one
when using hard tabs.

Closes #3575
2014-09-18 15:36:31 -07:00
Kevin Sawicki 597942c4ac Fail focused specs on CI
This ensures focused specs never end up as green builds
2014-09-18 15:18:42 -07:00
Kevin Sawicki 7f3279e789 Unfocus spec 2014-09-18 14:50:36 -07:00
Ben Ogle 325cc95f48 Fix specs 2014-09-18 13:53:13 -07:00
Ben Ogle 068c2c359f displayBufferMarker -> marker 2014-09-18 13:53:13 -07:00
Ben Ogle 39343b0c52 Fix reference to display-buffer-marker 2014-09-18 13:53:13 -07:00
Ben Ogle 6121147fc1 Upgrade text-buffer to have a private marker 2014-09-18 13:53:12 -07:00
Ben Ogle 65b41fa502 Move buffer-display-marker -> marker 2014-09-18 13:53:12 -07:00
Ben Ogle 9af2325f17 Rename DisplayBufferMarker -> Marker
Gnar!! 😎
2014-09-18 13:53:12 -07:00
Ben Ogle fb7b9041ab Shore up the docs around marker creation and invalidation 2014-09-18 13:53:12 -07:00
Ben Ogle bf44cf89db DisplayBufferMarker::matchesAttributes -> ::matchesProperties 2014-09-18 13:53:12 -07:00
Ben Ogle cef8b95ef3 Deprecate s|getAttributes for s|getProperties 2014-09-18 13:53:12 -07:00
Ben Ogle bd19899dd8 Add DisplayBufferMarker::getInvalidationStrategy 2014-09-18 13:53:12 -07:00
Ben Ogle e3ce6f8a20 Organize DisplayBufferMarker into sections. Add docs from Marker 2014-09-18 13:53:12 -07:00
Kevin Sawicki a88299284e Upgrade to language-ruby@0.38 2014-09-18 13:51:34 -07:00
Kevin Sawicki 0bf0829e77 Upgrade to settings-view@0.143 2014-09-18 13:40:16 -07:00
Kevin Sawicki 46adbea0c2 Merge pull request #3567 from atom/ks-deprecate-custom-dom-events
Deprecate custom DOM events
2014-09-18 13:30:59 -07:00
Kevin Sawicki 62a5c1c58d Don't dispose emitter, specs fail 2014-09-18 11:51:45 -07:00
Kevin Sawicki c291c705ec Add missing support to deprecation message 2014-09-18 11:51:45 -07:00
Kevin Sawicki 95253758f3 Dispose emitter after emitting did-destroy 2014-09-18 11:51:45 -07:00
Kevin Sawicki 1a24c79c7f Deprecate beep event 2014-09-18 11:51:45 -07:00
Kevin Sawicki 522a66c876 📝 Wrap ::onDidAddPaneItem in {} 2014-09-18 11:51:45 -07:00
Kevin Sawicki 67610829f4 Add Atom::onDidBeep 2014-09-18 11:51:44 -07:00
Kevin Sawicki fe30cf2135 Deprecate editor:detached 2014-09-18 11:51:44 -07:00
Kevin Sawicki 280a3c30e6 Deprecate editor:attached 2014-09-18 11:51:44 -07:00
Kevin Sawicki 0b82e83806 Move deprecatedViewEvents to deprecated section 2014-09-18 11:51:44 -07:00
Kevin Sawicki 6d2719c783 Deprecate editor:will-be-removed 2014-09-18 11:51:44 -07:00
Kevin Sawicki 31dd109343 Add Editor::onDidDestroy 2014-09-18 11:51:44 -07:00
Kevin Sawicki a5b7764b38 Deprecate pane:attached 2014-09-18 11:51:44 -07:00
Kevin Sawicki ddc88ec3ed Deprecate when pane:active-item-modified-status-changed 2014-09-18 11:51:44 -07:00
Kevin Sawicki 088d4f439f Deprecate pane:active-item-title-changed on PaneView 2014-09-18 11:51:44 -07:00
Kevin Sawicki b1994b28b3 Deprecate pane:active-item-title-changed 2014-09-18 11:51:44 -07:00
Kevin Sawicki cf303a73b7 Deprecate custom events on PaneView 2014-09-18 11:51:44 -07:00
Kevin Sawicki 1b25ea8a8d Deprecate custom events on EditorView 2014-09-18 11:51:44 -07:00
Kevin Sawicki 291b989ff0 Deprecate pane:item-moved 2014-09-18 11:51:43 -07:00
Kevin Sawicki 1850197f55 Deprecate pane:item-removed 2014-09-18 11:51:43 -07:00
Kevin Sawicki c2c0962e3b Deprecate pane:item-added 2014-09-18 11:51:43 -07:00
Kevin Sawicki 099953c58b Deprecate uri-opened 2014-09-18 11:51:43 -07:00
Kevin Sawicki 33fdb0b518 Deprecate pane:became-inactive 2014-09-18 11:51:43 -07:00
Kevin Sawicki 5148deded1 Deprecate pane:became-active 2014-09-18 11:51:43 -07:00
Kevin Sawicki fdddccf094 💄 2014-09-18 11:51:43 -07:00
Kevin Sawicki 4521eeaeb1 Deprecate pane:active-item-changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki 7344ba644e Deprecate pane-container:active-pane-item-changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki ce887fe877 Deprecate selection:changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki ee701f3b8b Deprecate cursor:moved 2014-09-18 11:51:43 -07:00
Kevin Sawicki c5f593cf08 deprecatedViewEvents -> setupViewEventDeprecations 2014-09-18 11:51:43 -07:00
Kevin Sawicki 4b4dc7224e Deprecate pane:removed event 2014-09-18 11:51:42 -07:00
Kevin Sawicki 31dd9bed6a Map over cmdArgs when quoting 2014-09-18 11:37:37 -07:00
Kevin Sawicki 44860ba572 Filter null/undefined arguments on Windows
These won't be able to be properly quoted
2014-09-18 11:36:41 -07:00
Kevin Sawicki c37e4649b5 Only call replace on string arguments
Prevents errors being thrown when trying to call replace on non-string
arguments.
2014-09-18 11:31:29 -07:00
Kevin Sawicki 3fb22f123a Don't throw errors when folding comments
Previously trying to fold single line comments at the start/end
of files would throw errors since the +1 and -1 used in the
index ranges would cause the loop to advance past the last row
or before the first row.
2014-09-18 11:06:25 -07:00
Kevin Sawicki 616dae2f22 Upgrade to tree-view@0.126 2014-09-18 10:33:08 -07:00
Kevin Sawicki e300677da0 Upgrade to less-cache@0.15 2014-09-18 10:03:33 -07:00
Kevin Sawicki ca9d05f6fa Remove notification stylesheet
These were currently undocumented in the styleguide, had hard-coded colors,
weren't being styled by the default light/dark UI themes, and were unused.

They were also causing conflicts with the notification token scope that
the Objective-C grammar uses.
2014-09-18 09:26:46 -07:00
Kevin Sawicki ba49f5d0b8 Upgrade to symbols-view@0.65 2014-09-18 09:22:56 -07:00
Kevin Sawicki 5d22f96f7b Upgrade to language-coffee-script@0.34 2014-09-18 08:52:19 -07:00
Kevin Sawicki afd6f6144c Upgrade to symbols-view@0.64 2014-09-17 18:16:09 -07:00
Kevin Sawicki 14b3bd5b39 Upgrade to language-coffee-script@0.33 2014-09-17 17:03:33 -07:00
Ben Ogle 7bf60a09dd Make ScrollView Extended 2014-09-17 17:02:41 -07:00
Ben Ogle 8448b265d5 Merge pull request #3549 from atom/bo-visibility-split
Add sections and split methods into essential / extended API
2014-09-17 16:51:50 -07:00
Ben Ogle a85a5e8495 Add public back for the deserializers 2014-09-17 16:20:08 -07:00
Ben Ogle 736342b527 Fix the title duplication 2014-09-17 15:59:22 -07:00
Ben Ogle fad83fff1c Change name of section in cursor 2014-09-17 15:57:24 -07:00
Ben Ogle 6f2b1a4b21 Reorganize Selection into sections 2014-09-17 15:57:13 -07:00
Ben Ogle 37ddf096a7 Reorganize ThemeManager into sections 2014-09-17 15:39:16 -07:00
Kevin Sawicki 27584cf069 Upgrade to grammar-selector@0.34 2014-09-17 15:20:31 -07:00
Kevin Sawicki 12181bcb02 Upgrade to language-coffee-script@0.32 2014-09-17 14:44:26 -07:00
Ben Ogle 0963077a32 Reorganize Project class into sections 2014-09-17 14:26:15 -07:00
Kevin Sawicki a476bb220a Upgrade to language-coffee-script@0.31 2014-09-17 14:26:12 -07:00
Ben Ogle cfffae936c Deprecate pathForRepositoryUrl for eventual removal 2014-09-17 14:23:46 -07:00
Nathan Sobo aa8bfd8e5f Remove stray console.log 2014-09-17 15:03:04 -06:00
Nathan Sobo d36c738b07 Merge pull request #3469 from atom/ns-command-registry
Add command registry
2014-09-17 14:55:19 -06:00
Kevin Sawicki bfdb5bd150 Upgrade to tabs@0.52 2014-09-17 13:52:21 -07:00
Kevin Sawicki 8b34f85f34 Upgrade to grammar-selector@0.33 2014-09-17 13:45:55 -07:00
Kevin Sawicki ad17b2d1c3 Upgrade to apm 0.94 2014-09-17 11:29:24 -07:00
Kevin Sawicki e4d50f4b38 Merge pull request #3565 from atom/ks-support-variation-sequences
Support variation sequences
2014-09-17 10:58:43 -07:00
Kevin Sawicki 146e8c2a0b 💄 Remove extra newline 2014-09-17 10:40:12 -07:00
Kevin Sawicki f1fd13b0b2 Return as soon as first paired character is found
Previously the character count of the entire string was taken even
though it was only checking for the presence of a paired character.

Now hasPairedCharacter returns as early as possible and the now
unused getCharacterCount has been removed.
2014-09-17 10:35:33 -07:00
Kevin Sawicki e343b0e0fc Don't treat consecutive variation selectors as a sequence 2014-09-17 10:17:27 -07:00
Kevin Sawicki c1aa5c9e48 📝 Mention variation sequence in comment 2014-09-17 10:17:27 -07:00
Kevin Sawicki 3acddf3e71 📝 Drop text 2014-09-17 10:17:26 -07:00
Kevin Sawicki df68ae26a2 Add specs for variation sequences 2014-09-17 10:17:26 -07:00
Kevin Sawicki fb7061f500 📝 Mention variation sequence in specs 2014-09-17 10:17:26 -07:00
Kevin Sawicki 878da262d2 Add support for Unicode variation sequences
These are character pairs that should be treated as tokens with a
buffer delta of 2 and a screen delta of 1.
2014-09-17 10:17:26 -07:00
Kevin Sawicki b6faffe2db Merge pull request #3555 from atom/ks-include-leading-trailing-classes-for-hard-tabs
Add leading/trailing whitespace classes to hard tab tokens
2014-09-17 10:15:34 -07:00
Kevin Sawicki 36f60c517e Assert other whitespace class is not present 2014-09-17 09:50:55 -07:00
Kevin Sawicki 348f865cab Add spec for all whitespace lines 2014-09-17 09:47:49 -07:00
Kevin Sawicki 18f54e6780 💄 Put leading spec first 2014-09-17 09:42:31 -07:00
Kevin Sawicki b281737838 Add leading/trailing classes to hard tab tokens
Previously the leading-whitespace and trailing-whitespace classes
were never added to tokens that were hard tabs.
2014-09-17 09:42:31 -07:00
Kevin Sawicki 72b92fc3e5 Only add command on platforms where it can be run
Closes #3561
2014-09-17 08:54:16 -07:00
Kevin Sawicki 03fcda8807 Upgrade to grammar-selector@0.32 2014-09-16 18:49:31 -07:00
Kevin Sawicki b6b7ce31a8 Upgrade to language-javascript@0.40 2014-09-16 18:10:32 -07:00
Ben Ogle 13cc97e44f Reorganize PackageManager into sections 2014-09-16 17:05:23 -07:00
Kevin Sawicki 3794cb606f Upgrade to grammar-selector@0.31 2014-09-16 16:56:36 -07:00
Kevin Sawicki 2dbaa52417 Upgrade to grammar-selector@0.30 2014-09-16 16:53:25 -07:00
Ben Ogle 6467f3c425 Reorganize cursor into sections 2014-09-16 16:50:17 -07:00
Kevin Sawicki ad288478d5 Upgrade to language-sql@0.11 2014-09-16 16:46:04 -07:00
Kevin Sawicki dd063c09d0 Upgrade to pathwatcher@2.1.3 2014-09-16 16:41:37 -07:00
Ben Ogle 5252b5314b WorkspaceView Public -> Essential 2014-09-16 16:30:46 -07:00
Ben Ogle 4c93045384 Reorganize WorkspaceView into sections 2014-09-16 16:30:13 -07:00
Ben Ogle fb1ac72b6e installShellCommands is not public 2014-09-16 16:23:30 -07:00
Kevin Sawicki 51aaffb2e5 Upgrade to status-bar@0.45 2014-09-16 16:22:07 -07:00
Ben Ogle 7ff5938454 Convert visibility in SelectListView 2014-09-16 16:18:47 -07:00
Ben Ogle 053d483b2b Rearrange SelectListView with sections 2014-09-16 16:06:37 -07:00
Paul Betts 1080eb2d11 CI version numbers are Magical(tm) 2014-09-16 16:00:57 -07:00
Paul Betts 246575390a Use ERB templates from Underscore-Plus 2014-09-16 15:41:57 -07:00
Paul Betts bc6c85ceca Sign the installer too 2014-09-16 15:21:44 -07:00
Paul Betts a0b405fe6f Populate atom.nuspec with the current Atom version 2014-09-16 15:16:42 -07:00
Paul Betts 54b89cebcc Merge remote-tracking branch 'origin/master' into squirrel-installer
Conflicts:
	build/Gruntfile.coffee
2014-09-16 14:50:29 -07:00
Ben Ogle b444fbd22c Git module is extended 2014-09-16 14:44:49 -07:00
Ben Ogle f1a5e8e1a8 Reorganize Git into sections 2014-09-16 14:41:23 -07:00
Kevin Sawicki 0098ac67ef Upgrade to markdown-preview@0.103 2014-09-16 14:23:38 -07:00
Ben Ogle cc64a2c3b4 Move things into the construction and destruction section 2014-09-16 14:10:49 -07:00
Ben Ogle b9a63d5030 Add bit about editorView being sparse 2014-09-16 14:07:04 -07:00
Kevin Sawicki c747ab411c Upgrade to tabs@0.51 2014-09-16 14:04:01 -07:00
Ben Ogle f80334d617 Task has better examples 2014-09-16 14:03:33 -07:00
Ben Ogle 679c52ffd1 Task is extended 2014-09-16 14:03:17 -07:00
Ben Ogle 1ee1eb3580 Syntax is extended 2014-09-16 13:43:56 -07:00
Ben Ogle 050ec6ca64 MenuManager is extended 2014-09-16 13:42:55 -07:00
Ben Ogle 69ba6e3e7e DeserializerManager is extended 2014-09-16 13:42:26 -07:00
Ben Ogle 6379f87b8a ContextMenuManager is Extended 2014-09-16 13:40:37 -07:00
Ben Ogle f3f4e8f7a3 Config is Essential 2014-09-16 13:39:43 -07:00
Ben Ogle dbca4f1b8c Clipboard is extended 2014-09-16 13:36:48 -07:00
Ben Ogle 1933488914 Buffered process classes are extended 2014-09-16 13:35:19 -07:00
Ben Ogle 6e7dae032d All dev tool methods are extended 2014-09-16 13:34:11 -07:00
Ben Ogle 88d0d291d4 Convert visibility in the messaging the user section 2014-09-16 13:31:53 -07:00
Ben Ogle 488b1819ae Convert visibility in the managing the window section 2014-09-16 13:31:18 -07:00
Ben Ogle b1df925d02 Convert visibility in metadata section 2014-09-16 13:30:47 -07:00
Ben Ogle dbf8094fdb Reorder the sections so public methods are closer to the top 2014-09-16 13:26:58 -07:00
Ben Ogle cf927e6405 Create Messaging the user + Deserializing sections 2014-09-16 13:23:09 -07:00
Ben Ogle 6a16a9b83f move Atom::open to the window management section 2014-09-16 13:22:21 -07:00
Ben Ogle ebb6ebca2a Move windowloadTime into metadata section 2014-09-16 13:21:35 -07:00
Ben Ogle 816bb9b38d Deserializers are private 2014-09-16 13:21:19 -07:00
Ben Ogle e260064df2 Add getLoadSettings to atom metadata section 2014-09-16 11:52:59 -07:00
Ben Ogle a3e4ccbb83 Create atom metadata section 2014-09-16 11:52:11 -07:00
Ben Ogle e84eba058a Move deprecated methods to the bottom of the file 2014-09-16 11:44:00 -07:00
Ben Ogle c25a04fd53 Move fullscreen stuff into the managing window section 2014-09-16 11:42:07 -07:00
Ben Ogle 9e68e47432 💄 2014-09-16 11:37:30 -07:00
Ben Ogle 53806d7d63 Managing the dev tool section 2014-09-16 11:37:21 -07:00
Ben Ogle c0dd53104a Make a managing the atom window section
de-public the get/setWindowDimensions in favor of 
the (get|set)(Size|Position)
2014-09-16 11:37:11 -07:00
Ben Ogle 39d7e12ebb Fix deprecation method calls 2014-09-16 11:35:14 -07:00
Ben Ogle 779619a4f2 Construction and destruction section 2014-09-16 10:58:36 -07:00
Ben Ogle b3ec8ed03f Make Atom::initialize private 2014-09-16 10:58:27 -07:00
Ben Ogle f84666943c Properties section 2014-09-16 10:58:08 -07:00
Ben Ogle 9eb51dfd0a Make Atom.loadOrCreate Private 2014-09-16 10:56:48 -07:00
Ben Ogle ac516102ca Atom is Essential 2014-09-16 10:56:26 -07:00
Ben Ogle 5b8e30580d Reorg Event Subscription section 2014-09-16 10:52:33 -07:00
Ben Ogle 44fd6cc335 Workspace is Essential 2014-09-16 10:51:34 -07:00
Ben Ogle e01d96862f Update docs in decoration 2014-09-16 10:51:34 -07:00
Ben Ogle d349ec55f9 Use new methods 2014-09-16 10:51:34 -07:00
Ben Ogle bbe69347ee Clean up the syntax scopes section 2014-09-16 10:51:34 -07:00
Ben Ogle 6270f2ff55 Add missing argument to docs 2014-09-16 10:51:33 -07:00
Ben Ogle 1ef2aa63d6 Clean up visibilities where I made an error 2014-09-16 10:51:33 -07:00
Ben Ogle ff188723cd Create a saving section 2014-09-16 10:51:33 -07:00
Ben Ogle b661cdd229 💄 2014-09-16 10:51:33 -07:00
Ben Ogle 499888a386 Reorg marker section 2014-09-16 10:51:33 -07:00
Ben Ogle 86bbf4276b Reorg the Decorations section 2014-09-16 10:51:33 -07:00
Ben Ogle 48d02cf934 Reorganize the Folds section 2014-09-16 10:51:33 -07:00
Ben Ogle 9dacdaf2ef Reorganize the Syntatic Queries section 2014-09-16 10:51:33 -07:00
Ben Ogle af184fe2ff Convert visibility on the grammars section 2014-09-16 10:51:33 -07:00
Ben Ogle d827d4ad34 Change visibility on the Editor Coordinates section 2014-09-16 10:51:33 -07:00
Ben Ogle 4238052dc3 Move text mutation transactions into the mutating text section 2014-09-16 10:51:33 -07:00
Ben Ogle 5790221c15 Reorg undo section 2014-09-16 10:51:32 -07:00
Ben Ogle 5f807df1b0 Reorganize the indentation section 2014-09-16 10:51:32 -07:00
Ben Ogle 30ced48d23 Reorganize Soft Wrap Behavior section 2014-09-16 10:51:32 -07:00
Ben Ogle d17c6e409f Reorganize Tab Behavior section 2014-09-16 10:51:32 -07:00
Ben Ogle 81165e0e41 Add docs for the Editor::scan methods 2014-09-16 10:51:32 -07:00
Ben Ogle 49f5817b87 Convert visibility of the removing text section 2014-09-16 10:51:32 -07:00
Ben Ogle 6b71ea1875 Convert visibility in the Inserting Text section 2014-09-16 10:51:32 -07:00
Ben Ogle 6287f90a39 Convert visibility in the Mutating text section 2014-09-16 10:51:32 -07:00
Ben Ogle 783c1dd449 Convert visibility in the mutating text section 2014-09-16 10:51:32 -07:00
Ben Ogle 719ab078cc Convert file details section to essential extended 2014-09-16 10:51:32 -07:00
Ben Ogle 2491090c91 Move Essential methods above the extended versions 2014-09-16 10:51:32 -07:00
Ben Ogle f12b70e3b7 Editor::onDidChangeScreenLines -> onDidChange 2014-09-16 10:51:32 -07:00
Ben Ogle 4a20f13162 Upgrade scandal to handle negate syntax
!*.coffee
2014-09-16 10:25:25 -07:00
Kevin Sawicki 73253d37bc Prepare 0.130 2014-09-16 10:19:32 -07:00
Kevin Sawicki 16c9c41978 Upgrade to tree-view@0.125 2014-09-16 10:02:45 -07:00
Kevin Sawicki c7ca3e66fd Prepare 0.129 2014-09-16 09:27:02 -07:00
Nathan Sobo eb97154c94 Merge remote-tracking branch 'origin/master' into ns-command-registry 2014-09-16 10:27:00 -06:00
Nathan Sobo 1f95d8069a Document CommandRegistry 2014-09-16 10:08:17 -06:00
Kevin Sawicki dc88f080a3 Upgrade to tree-view@0.124 2014-09-16 09:00:30 -07:00
Nathan Sobo a069f34ad6 Fix CommandRegistry::findCommands spec
Don’t assert against commands registered on the window with jQuery
2014-09-16 09:23:52 -06:00
Nathan Sobo 33ad0a9b93 Delegate ::onDidChangeActivePane and ::observeActivePane 2014-09-16 09:19:07 -06:00
Kevin Sawicki 5c77b06d2a Add Editor:onDidSave 2014-09-15 18:25:29 -07:00
Kevin Sawicki 82a906cce5 Add Workspace::onDidChangeActivePaneItem
Closes #3546
2014-09-15 16:39:53 -07:00
Kevin Sawicki 94e285611c getActiveItem -> getActivePaneItem 2014-09-15 16:31:01 -07:00
Nathan Sobo ebe116d724 Update parent view is-focused and mini classes on editor mount
Fixes #3526
2014-09-15 16:03:36 -06:00
Nathan Sobo 647f6c5b24 Upgrade keybinding resolver to fix deprecation warnings in specs 2014-09-15 15:44:17 -06:00
Nathan Sobo 01a3e0cfba Merge pull request #3545 from atom/ns-revert-soft-wrapped
Rename soft-wrapped back to soft-wrap
2014-09-15 14:49:10 -06:00
Nathan Sobo 3faf566a48 Rename editor:toggle-soft-wrapped back to editor:toggle-soft-wrap 2014-09-15 14:34:35 -06:00
Nathan Sobo a0edb92e16 Rename editor.softWrapped config option back to editor.softWrap 2014-09-15 14:34:35 -06:00
Kevin Sawicki 69480385e6 Upgrade to tree-view@0.123 2014-09-15 13:02:21 -07:00
Kevin Sawicki 804f290cd3 Memoize comment scope selector 2014-09-15 13:01:37 -07:00
Ben Ogle 274a36e263 Upgrade UI themes to fix tabs 2014-09-15 11:18:51 -07:00
Nathan Sobo 4a14580429 Merge pull request #3338 from atom/ns-change-ctrl-a-binding
Change ctrl-a binding to editor:move-to-first-character-of-line on Mac
2014-09-15 12:15:59 -06:00
Kevin Sawicki 17a6256483 Upgrade to find-and-replace@0.138 2014-09-15 11:10:35 -07:00
Kevin Sawicki 7d61330b9f Upgrade to tree-view@0.122 2014-09-15 11:07:49 -07:00
Kevin Sawicki 5e52357674 Upgrade to markdown-preview@0.102 2014-09-15 11:05:39 -07:00
Kevin Sawicki 6ee82d4937 Upgrade to tree-view@0.121 2014-09-15 10:56:01 -07:00
Kevin Sawicki 863362ffed 📝 Outdent ordered list 2014-09-15 08:51:10 -07:00
Kevin Sawicki cea7d89129 📝 🐧 Tweak Linux instructions 2014-09-15 08:50:16 -07:00
Kevin Sawicki 5e65339332 Merge pull request #3535 from Bengt/patch-1
Elaborate getting a current working copy.
2014-09-15 08:44:06 -07:00
Kevin Sawicki 8c2bcf3943 Catch and log deactivate errors
Closes #3538
2014-09-15 08:34:54 -07:00
Kevin Sawicki 10762d6440 Upgrade to language-gfm@0.50 2014-09-15 08:21:19 -07:00
Kevin Sawicki f872583c81 Upgrade to tree-view@0.120 2014-09-14 09:37:26 -07:00
Bengt Lüers ca8153b56b Elaborate getting a current working copy.
The `git checkout` step from #3098 got removed by some merge, so here it is again.
2014-09-14 15:15:52 +02:00
Kevin Sawicki 54c1dd5225 Upgrade to language-php@0.16 2014-09-12 15:10:04 -07:00
Kevin Sawicki d858c6c357 Merge pull request #3528 from atom/ks-add-debian-asset
Add Debian asset to releases
2014-09-12 13:45:47 -07:00
Kevin Sawicki 6d1d6de8ff Restore only uploading from master 2014-09-12 13:28:10 -07:00
Kevin Sawicki 97e7d24f43 Add missing task helpers require 2014-09-12 13:22:15 -07:00
Kevin Sawicki 1bfda1fc61 Copy .deb file to proper upload path 2014-09-12 13:22:15 -07:00
Kevin Sawicki b1a6772105 Don't include version in .deb asset name 2014-09-12 13:22:15 -07:00
Kevin Sawicki bf76a3f1e7 Only publish on Linux for now 2014-09-12 13:22:15 -07:00
Kevin Sawicki 8dcd454401 Remove token logging 2014-09-12 13:22:15 -07:00
Kevin Sawicki 3a2c155afc Log token 2014-09-12 13:22:15 -07:00
Kevin Sawicki e00ff30cd7 Extensions should be an array 2014-09-12 13:22:14 -07:00
Kevin Sawicki 38eda4ca14 Remove duplidate tasks in CI tasks array 2014-09-12 13:22:14 -07:00
Kevin Sawicki dc0bdef36c Don't run specs on Linux CI for now 2014-09-12 13:22:14 -07:00
Kevin Sawicki 9717d973a7 Upload .deb asset during publish 2014-09-12 13:22:14 -07:00
Kevin Sawicki 24206d45a7 Run mkdeb task on Linux CI 2014-09-12 13:22:14 -07:00
Kevin Sawicki a1e177c7dc Set ATOM_ACCESS_TOKEN 2014-09-12 13:22:14 -07:00
Kevin Sawicki 735d1a912e Log debug output 2014-09-12 13:22:14 -07:00
Kevin Sawicki e060d0b562 Add initial Linux CI build script 2014-09-12 13:22:14 -07:00
Kevin Sawicki 68e11fed11 Add .node-version file with 0.10.21 2014-09-12 13:22:14 -07:00
Kevin Sawicki c72ce45820 Log installed node version 2014-09-12 13:22:14 -07:00
Kevin Sawicki 04cc11fa81 Don't read env var files on Linux 2014-09-12 13:22:14 -07:00
Kevin Sawicki f14ad99558 Remove linux check 2014-09-12 13:22:14 -07:00
Kevin Sawicki a060eff478 Use skinny arrows 2014-09-12 11:23:15 -07:00
Ben Ogle 1c57a8b0cd Update event-kit with better organization in docs 2014-09-12 11:19:37 -07:00
Ben Ogle 7c1cab7789 Don’t recurse into dependencies of dependencies.
We always want the top level module!
2014-09-12 10:49:53 -07:00
Kevin Sawicki 591d9068d8 Upgrade to tree-view@0.119 2014-09-12 10:43:15 -07:00
Kevin Sawicki c24bf5bd0c Upgrade to find-and-replace@0.137 2014-09-12 10:34:59 -07:00
Kevin Sawicki 050a79e5b9 Upgrade to find-and-replace@0.136 2014-09-12 10:29:01 -07:00
Kevin Sawicki ee8b01e46a Upgrade to find-and-replace@0.135 2014-09-12 10:10:04 -07:00
Kevin Sawicki ceb48b7f4f Upgrade to tree-view@0.118 2014-09-12 09:51:01 -07:00
Kevin Sawicki 61e01c3984 Upgrade to language-ruby@0.37 2014-09-12 09:11:42 -07:00
Cheng Zhao 901ba72557 Show the open dialog as child window on Windows and Linux.
On Mac the open dialog is still showed as independent dialog, this matches
most native apps' behavior.

Fixes #3401.
2014-09-12 21:43:01 +08:00
Kevin Sawicki 8cffb8006a Upgrade to language-gfm@0.49 2014-09-11 21:41:15 -07:00
Ben Ogle 0643aa66c9 Upgrade atom-keymap for new docs organization 2014-09-11 18:23:39 -07:00
Ben Ogle d0033b2d40 Upgrade tello for bugfix 2014-09-11 18:23:39 -07:00
Kevin Sawicki 8847b35931 Upgrade to tree-view@0.117 2014-09-11 18:11:16 -07:00
Kevin Sawicki 9a534f0b6d Upgrade to tree-view@0.116 2014-09-11 17:35:07 -07:00
Kevin Sawicki 137b926f54 Upgrade to archive-view@0.37 2014-09-11 17:15:49 -07:00
Ben Ogle 24d1a45fd9 Upgrade to pathwather with better doc organization 2014-09-11 16:29:52 -07:00
Kevin Sawicki ea6f124724 Merge pull request #3519 from atom/ks-remeasure-after-themes-load
Wait for themes to load before measuring
2014-09-11 16:22:07 -07:00
Kevin Sawicki c161e93b96 💄 Add ? 2014-09-11 16:08:04 -07:00
Kevin Sawicki e6252546c4 Set initialLoadComplete to true in specs 2014-09-11 15:49:44 -07:00
Kevin Sawicki 4a1f048d52 Refresh scrollbars when no stylesheet is specified 2014-09-11 15:44:30 -07:00
Kevin Sawicki dc5eb95a39 Wait for initial stylesheet load to complete
Instead of measuring on each stylesheet load at startup,
wait for the initial load of all the stylesheets to complete
and then do the necessary measurments.
2014-09-11 15:32:02 -07:00
Kevin Sawicki 844fd29dad Remove unused param 2014-09-11 15:32:02 -07:00
Kevin Sawicki 7b1a38bf8b Upgrade to wrap-guide@0.22 2014-09-11 15:31:47 -07:00
Ben Ogle 54ef5acdc6 Upgrade first-mate with new docs 2014-09-11 14:59:24 -07:00
Ben Ogle c8ccf1e0d7 Merge pull request #3518 from atom/bo-font-settings-in-model
Deprecate font-size, font-family, line-height, invisibles, indent guide methods on EditorView
2014-09-11 14:21:34 -07:00
Kevin Sawicki aee496346b Prepare 0.128 2014-09-11 14:10:44 -07:00
Ben Ogle 6a2c161bf2 Deprecate setShowInvisibles 2014-09-11 14:10:33 -07:00
Ben Ogle 5ef31e00a2 Deprecate EditorView::setShowIndentGuide 2014-09-11 14:10:17 -07:00
Ben Ogle f8ba40bcfe Deprecate font-size, font-family, line-height methods on EditorView. 2014-09-11 14:00:34 -07:00
Ben Ogle 834176f7b7 Merge pull request #3514 from atom/bo-remove-method-deprecations
Remove event deprecations from core
2014-09-11 13:45:26 -07:00
Ben Ogle 3f3284a8db Move the deprecations 2014-09-11 13:33:50 -07:00
Kevin Sawicki ff308d366c Upgrade to language-ruby@0.36 2014-09-11 13:27:47 -07:00
Nathan Sobo 98a51005c3 Upgrade command-palette to use atom.commands global 2014-09-11 14:25:53 -06:00
Nathan Sobo fb6a184b0e Include commands registered via jQuery in CommandRegistry::findCommands 2014-09-11 14:18:57 -06:00
Nathan Sobo 8b7b946429 Set root node to workspace view when it’s constructed
Makes it easier to deal with specs
2014-09-11 14:18:57 -06:00
Nathan Sobo e4264035d8 fixup! Clear atom.commands after each spec 2014-09-11 14:18:00 -06:00
Nathan Sobo 8f9cf3c790 Set the atom.commands root node to document.body in beforeEach 2014-09-11 14:17:45 -06:00
Nathan Sobo 99cf8fabc0 Clear atom.commands after each spec 2014-09-11 14:13:48 -06:00
Nathan Sobo 3e0e19d51b Add CommandRegistry::findCommands 2014-09-11 13:48:35 -06:00
Nathan Sobo 155fb675ec 💄 group dispatch specs 2014-09-11 13:48:35 -06:00
Nathan Sobo ab8ac369df Move a few workspace commands to the command registry 2014-09-11 13:48:35 -06:00
Nathan Sobo a348ecf034 Allow CommandRegistry::rootNode to be reassigned 2014-09-11 13:48:35 -06:00
Nathan Sobo dac127c30b Assign atom.commands to a CommandRegistry instance 2014-09-11 13:48:35 -06:00
Nathan Sobo 7580d64d2e Allow CommandRegistry::rootNode to be assigned after construction 2014-09-11 13:48:35 -06:00
Nathan Sobo 43d3082d4e Allow multiple commands to be registered by passing an object 2014-09-11 13:48:35 -06:00
Nathan Sobo aee33fc126 Pass selector first to CommandRegistry::add 2014-09-11 13:48:35 -06:00
Nathan Sobo 4de0865d28 Allow listeners to be removed via a Disposable returned from ::add 2014-09-11 13:48:34 -06:00
Nathan Sobo fe27ebec1b Handle .stopImmediatePropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo fbaf956e1f Handle .stopPropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo 5eb22520f1 Order multiple matching listeners by selector specificity 2014-09-11 13:48:34 -06:00
Nathan Sobo a075aa2b07 Perform synthetic bubbling through event target ancestors 2014-09-11 13:48:34 -06:00
Nathan Sobo decc983420 Start on CommandRegistry 2014-09-11 13:48:34 -06:00
Ben Ogle 04c0824822 Fix / clean up specs 2014-09-11 11:28:21 -07:00
Ben Ogle f38fb2a924 nof 2014-09-11 11:11:15 -07:00
Nathan Sobo 04caea9bb0 Upgrade autosave to suppress autosave when opening menus inside editor 2014-09-11 11:56:36 -06:00
Ben Ogle f39114a95c Subscribe to items via event methods.
Add deprecation warnings when they don’t return a disposable
2014-09-11 10:48:03 -07:00
Nathan Sobo 435e081402 Upgrade autosave to autosave all items on window blur 2014-09-11 11:20:19 -06:00
Nathan Sobo 36aa3834d3 Only call ::checkForVisibilityChange on editor attachment, not ::pollDOM
I’m pretty sure ::pollDOM is subsumed by ::checkForVisibilityChange
because there’s no reason the editor would be considered visible prior
to being attached.
2014-09-11 10:38:36 -06:00
Nathan Sobo 50a751b8e6 Merge pull request #3517 from smashwilson/ensure-measurements
Force visibility-change checking in EditorView's afterAttach method
2014-09-11 10:35:23 -06:00
Ash Wilson 40570c0b99 Force visibility-change checking in EditorView.
When an `EditorView` becomes attached, if hardware acceleration is enabled,
the call to `pollDOM` is a no-op because there's already a refresh pending.
This can cause problems, because then the initial measurements don't happen
and (for example) the lineHeight is left as null - it'll be set on the next
rendering, but not before subscribers to `workspaceView.eachEditorView` are
notified.
2014-09-11 11:14:41 -04:00
Ben Ogle 025c6111b3 Move global editor stylesheet updating into the ThemeManager 2014-09-10 18:01:45 -07:00
Ben Ogle 667315aff5 Add ThemeManager::onDidUpdateStylesheet 2014-09-10 18:01:27 -07:00
Ben Ogle c1f8065caf Use the new split*() methods on Pane model in WorkspaceView specs 2014-09-10 17:41:38 -07:00
Ben Ogle 70e1d14f96 Add KeymapManager::onDidLoadBundledKeymaps 2014-09-10 17:28:47 -07:00
Ben Ogle 7625e5352d Use event methods in EditorComponent 2014-09-10 17:28:26 -07:00
Ben Ogle 6e3c945fa2 Use event methods for theme subscriptions 2014-09-10 17:26:08 -07:00
Ben Ogle f8b17b6b3c Add Returns line to all the event subscription methods 2014-09-10 17:07:21 -07:00
Nathan Sobo d55f5cba78 Upgrade first-mate for event subscription methods 2014-09-10 17:24:55 -06:00
Nathan Sobo f0a19e3f67 Upgrade atom-keymap for event subscription methods 2014-09-10 16:41:05 -06:00
Ben Ogle 465c13e292 Update packages that use atomdoc to force update of atomdoc 2014-09-10 15:36:48 -07:00
Ben Ogle be1d4ee5dc Use explicit versions of donna and tello in build package.json 2014-09-10 14:37:40 -07:00
Nathan Sobo 238cf60882 Upgrade pathwatcher for explicit event subscription methods 2014-09-10 14:58:21 -06:00
Ben Ogle 60a3cebfab Fix section name in git class 2014-09-10 12:13:04 -07:00
Ben Ogle 8f8165e289 Fix doc strings in Atom class 2014-09-10 12:12:36 -07:00
Ben Ogle d3b3fdefc9 Merge pull request #3507 from atom/bo-rename-events
Rename the rest of the internal events to the onDid* pattern
2014-09-10 12:11:26 -07:00
Ben Ogle 49937b2956 Revert "Add Project::onDidChangePath()"
This reverts commit ed4acb02d8.

Conflicts:
	src/project.coffee
2014-09-10 11:56:38 -07:00
Ben Ogle 40b32930cf Revert "Add Project::onDidCreateBuffer"
This reverts commit 4070e5fb25.
2014-09-10 11:55:41 -07:00
Ben Ogle 61fa1c4230 Revert "Add Project::observeBuffers"
This reverts commit b6fe72ef9e.

Conflicts:
	src/project.coffee
2014-09-10 11:55:26 -07:00
Ben Ogle 6a0a842de4 Update section comments 2014-09-10 11:52:57 -07:00
Kevin Sawicki c141448e9f Wrap HTML elements in $ so matchers still work 2014-09-10 11:19:05 -07:00
Kevin Sawicki 61166bf365 Don't track focus for spec windows 2014-09-10 11:14:08 -07:00
Kevin Sawicki 9c24e5a23d Prepare 0.127 2014-09-10 11:02:57 -07:00
Kevin Sawicki 883f7e1f5a Use cross-platform path in specs 2014-09-10 10:22:48 -07:00
Kevin Sawicki d9b1b7b399 Don't dump symbols on Windows CI for now
Currently errors and isn't uploaded yet anyway as a release asset
2014-09-10 10:08:26 -07:00
Kevin Sawicki d1bdda5b3e Upgrade to language-html@0.26 2014-09-10 09:40:55 -07:00
Nathan Sobo a3f3b7e032 Upgrade text-buffer to fix null exception 2014-09-10 09:45:06 -06:00
Kevin Sawicki 3228de7ead Merge pull request #3508 from envygeeks/patch-2
Proc requires super user permissions on Linux.
2014-09-09 18:45:50 -07:00
Jordon Bedwell 5a64b09924 Proc requires super user permissions on Linux. 2014-09-09 20:36:40 -05:00
Kevin Sawicki b0c17aa98f 📝 Correct misspellings 2014-09-09 18:32:37 -07:00
Kevin Sawicki 9f5f4f2c10 Merge pull request #3499 from envygeeks/patch-1
Add alternatives alternative to symlinks.
2014-09-09 18:31:22 -07:00
Jordon Bedwell 335339ef61 Change language and make the command one line. 2014-09-09 20:20:39 -05:00
Kevin Sawicki 291bf7fe08 Upgrade to pathwatcher 2.0.12 2014-09-09 16:31:00 -07:00
Kevin Sawicki 40eaf69ab0 Upgrade to metrics@0.34 2014-09-09 16:25:44 -07:00
Kevin Sawicki 55ac855de1 Upgrade to pathwatcher 2.0.11 2014-09-09 16:12:20 -07:00
Ben Ogle 2e219f288d Add sections for docs clarity 2014-09-09 15:55:47 -07:00
Ben Ogle 09fbd46869 Remove event docs 2014-09-09 15:43:35 -07:00
Ben Ogle 10ceb34426 Fix docs 2014-09-09 15:43:12 -07:00
Ben Ogle 5ba5215f5d Add event subscription methods to ThemeManager 2014-09-09 15:35:00 -07:00
Ben Ogle 3bf348e51f Add ThemeManager::onDidReloadAll 2014-09-09 15:24:55 -07:00
Ben Ogle 0afd8a1392 Add Package::onDidDeactivate 2014-09-09 15:09:18 -07:00
Ben Ogle 55b5debd7f Add PackageManager::onDidLoadAll 2014-09-09 15:04:13 -07:00
Ben Ogle 229277f764 Add PackageManager::onDidActivateAll() 2014-09-09 15:03:45 -07:00
Ben Ogle af1b0b5736 Fix Doc String 2014-09-09 14:45:41 -07:00
Ben Ogle ae4f92cc52 Add onDidChangeStatuses 2014-09-09 14:45:31 -07:00
Kevin Sawicki 66b27ad52a Upgrade to snippets@0.52 2014-09-09 14:30:52 -07:00
Ben Ogle dddd17c11b Fix observeBuffers 2014-09-09 14:29:14 -07:00
Ben Ogle 05f54d427d Add Git::onDidChangeStatus 2014-09-09 14:28:30 -07:00
Ben Ogle ffbb18a0f8 Remove event comments, add method section comment 2014-09-09 14:16:10 -07:00
Ben Ogle b6fe72ef9e Add Project::observeBuffers 2014-09-09 14:13:26 -07:00
Ben Ogle 4070e5fb25 Add Project::onDidCreateBuffer 2014-09-09 14:12:49 -07:00
Ben Ogle ed4acb02d8 Add Project::onDidChangePath() 2014-09-09 13:58:23 -07:00
Ben Ogle ab96e5b5fd 💄 Fix doc string 2014-09-09 13:58:01 -07:00
Ben Ogle f357f694b3 Merge pull request #3456 from atom/ns-editor-event-methods
Add event subscription methods for Editor and associated classes
2014-09-09 13:40:45 -07:00
Ben Ogle 2a02375c4d Move the Decoration events to an events section 2014-09-09 12:31:01 -07:00
Ben Ogle e452b88fec Add sections for events 2014-09-09 12:30:43 -07:00
Ben Ogle 0f83fe54f9 Add and use Editor::observeSelections() and ::observeCursors() 2014-09-09 12:08:43 -07:00
Ben Ogle 3e5666f183 use getPaneView rather than getPane 2014-09-09 12:08:12 -07:00
Nathan Sobo 260f72d2b5 Merge pull request #3495 from atom/atom-shell-v0.16.0
Upgrade to Chrome 37
2014-09-09 12:43:42 -06:00
Nathan Sobo 84deefb6b1 Upgrade atom-shell to incorporate changes in 92.2 and 92.3 2014-09-09 12:31:48 -06:00
Nathan Sobo 5afceb3951 Merge remote-tracking branch 'origin/master' into atom-shell-v0.16.0
Conflicts:
	apm/package.json
2014-09-09 12:05:54 -06:00
Ben Ogle 72be16736c isDestroyed -> destroyed 2014-09-09 10:58:12 -07:00
Ben Ogle 789d9c8eff 📝 Selection event methods 2014-09-09 10:56:44 -07:00
Ben Ogle 858ac5bf79 onDidChangeSelectionScreenRange -> onDidChangeSelectionRange
for consistency
2014-09-09 10:54:57 -07:00
Ben Ogle 9db804b413 Doc events in Cursor 2014-09-09 10:51:46 -07:00
Ben Ogle c7525e8cff 💄 doc strings 2014-09-09 10:51:35 -07:00
Ben Ogle 7198a919bf onDidMoveCursor -> onDidChangeCursorPosition 2014-09-09 10:43:25 -07:00
Ben Ogle aebdfb4cf6 Event docs 2014-09-09 10:39:41 -07:00
Kevin Sawicki 7b1f8cc7da Set project path for window:open-path files
The project path will now be set to the parent directory if it isn't
already set when a file path is specified via the window:open-path
event.

Closes atom/tree-view#217
2014-09-09 09:55:31 -07:00
Nathan Sobo 17aa6f958c Upgrade autocomplete to fix specs 2014-09-09 10:18:19 -06:00
Cheng Zhao 3e10f491b4 Disable subpixel font scaling. 2014-09-09 21:54:32 +08:00
Cheng Zhao 3487ab9b11 Upgrade to atom-shell@0.16.2 2014-09-09 20:44:49 +08:00
Kevin Sawicki f6545d4002 Check if name matches before resolving path
Path resolution hits the filesystem so check for a name
match first.
2014-09-08 17:27:34 -07:00
Kevin Sawicki 408cac4632 🐎 Use DOM APIs to find editor views 2014-09-08 17:10:30 -07:00
Kevin Sawicki bb5a440651 :racehorse Upgrade to atom-keymap@2.0.6 2014-09-08 16:56:10 -07:00
Ben Ogle 5883e27c60 Make Editor::onDidChangeGrammar emit from Editor
Seems like the initial implementation was to handle the event, unfold 
all then, re-emit the grammar-changed event.
2014-09-08 16:32:43 -07:00
Ben Ogle 1d073173d4 Add Editor::onDidChangeSelectedScreenRange 2014-09-08 16:25:35 -07:00
Ben Ogle 601b311496 Add Editor::onDidMoveCursor 2014-09-08 16:20:54 -07:00
Ben Ogle d4835e1d8e Add Editor:onScrollTopChanged and Editor:onScrollLeftChanged 2014-09-08 16:17:06 -07:00
Ben Ogle 6f9f087e11 💄 consistency 2014-09-08 16:05:31 -07:00
Ben Ogle b6a9e1b576 Fix deprecation warning 2014-09-08 16:05:21 -07:00
Ben Ogle efea16848a Add deprecation warnings for all the other converted events 2014-09-08 16:05:07 -07:00
Ben Ogle 8aa1784c4a Add Editor::onDidChangeScreenLines 2014-09-08 16:04:43 -07:00
Nathan Sobo 2d3ae1b44d Upgrade event-kit for api docs 2014-09-08 17:00:46 -06:00
Jordon Bedwell efc730dc2f Add alternatives alternative to symlinks. 2014-09-08 14:39:47 -05:00
Kevin Sawicki 70dd3675e6 Upgrade to minidump 0.8 2014-09-08 12:05:25 -07:00
Kevin Sawicki 30ae93b9d9 Upgrade to apm 0.92.3
Refs #3492
2014-09-08 10:12:31 -07:00
Kevin Sawicki aa5a094cbe Merge pull request #3470 from atom/ks-no-jquery-to-apply-stylesheets
Use DOM APIs to apply stylesheets
2014-09-08 10:09:06 -07:00
Kevin Sawicki ab75f3122f 💄 Use proper Less 2014-09-08 09:45:24 -07:00
Kevin Sawicki 359491fc3f Remove nulled variable 2014-09-08 09:40:06 -07:00
Kevin Sawicki 444eb0e5e5 💄 e -> error 2014-09-08 09:37:39 -07:00
Kevin Sawicki 522d446366 📝 Emit -> Emitted 2014-09-08 09:35:05 -07:00
Kevin Sawicki f8949adf38 💄 Sort requires 2014-09-08 09:34:31 -07:00
Kevin Sawicki 01d62653f2 Remove unused require 2014-09-08 09:33:51 -07:00
Kevin Sawicki 35a48f0cfb Update specs to expect an element 2014-09-08 09:33:51 -07:00
Kevin Sawicki f7103bbed6 Store sheet before it goes away 2014-09-08 09:33:51 -07:00
Kevin Sawicki 7e6b7ada54 Preserve ordering within type class 2014-09-08 09:33:51 -07:00
Kevin Sawicki 5e2f8a3ae3 🐎 Use DOM APIs to apply stylesheets
Previously jQuery was used, but using the DOM APIs directly
takes 1/3 of the time.
2014-09-08 09:33:51 -07:00
Kevin Sawicki 4bda13ec74 Merge pull request #3453 from atom/ks-lower-browser-process-startup-time
Lower browser process startup time
2014-09-08 09:32:48 -07:00
Kevin Sawicki 42f3605465 finish-launching -> ready 2014-09-08 09:22:46 -07:00
Kevin Sawicki e7e4196fa6 Use fs.statSyncNoException 2014-09-08 09:22:45 -07:00
Kevin Sawicki 68801aacdb Don't require shell until it is used 2014-09-08 09:22:45 -07:00
Kevin Sawicki 13956edfb5 Always assign to autoUpdater 2014-09-08 09:22:45 -07:00
Kevin Sawicki 3a7564b59e Start auto updater on the next tick
This prevents it from adding time to first window startup
2014-09-08 09:22:45 -07:00
Kevin Sawicki 4e0928600f 💄 2014-09-08 09:22:45 -07:00
Kevin Sawicki 417134c799 Require dialog when used 2014-09-08 09:22:45 -07:00
Kevin Sawicki b2638c8bad 💄 2014-09-08 09:22:45 -07:00
Kevin Sawicki 27bf096fbc Remove require that is now inlined where used 2014-09-08 09:22:44 -07:00
Kevin Sawicki 4fa6f631a9 Defer ContextMenu require until requested 2014-09-08 09:22:44 -07:00
Kevin Sawicki 6e7968861d Use fs instead of fs-plus
Since only an is file check is performed fs is sufficient
2014-09-08 09:22:44 -07:00
Kevin Sawicki fc59d9c503 Require https on a next tick
This require is heavy in node for some reason so only
require it on Windows since it is only used there and only
after a next tick so that it doesn't affect startup
2014-09-08 09:22:44 -07:00
Kevin Sawicki 163b52efb0 CoffeeScript.compile returns a string 2014-09-08 09:22:44 -07:00
Kevin Sawicki d4ed8a0b73 Defer requiring CoffeeScript
Requiring it up front adds about 30-40ms to startup.
2014-09-08 09:22:44 -07:00
Kevin Sawicki d7106a6b4c Make browser process benchmark executable 2014-09-08 09:22:43 -07:00
Kevin Sawicki 4b867ddc7a Properly delete socket file in benchmark 2014-09-08 09:22:43 -07:00
Kevin Sawicki b5dfaff426 Remove unused requires from main.coffee 2014-09-08 09:22:43 -07:00
Kevin Sawicki 7eba55d009 Add initial browser process startup benchmark 2014-09-08 09:22:43 -07:00
alandarev abbb21bf47 🐧 Add Category 'Development' to linux desktop file
Closes #2827
Closes #3482
Closes #3488
2014-09-08 08:37:50 -07:00
Kevin Sawicki ff4d4f047f Merge pull request #3472 from pinak222/master
🐧 Add MimeType text/plain to .desktop file
2014-09-08 08:34:52 -07:00
Kevin Sawicki 9e21ea39bd Upgrade to language-xml@0.20 2014-09-08 08:33:48 -07:00
Ivan Žužak 11dbee0290 Merge pull request #3468 from atom/iz-update-keymap-instructions
Explain capital letters in keystrokes in default keymap.cson comments
2014-09-08 15:21:46 +02:00
Cheng Zhao de4936efc8 Upgrade to apm@0.93.1 2014-09-08 18:27:24 +08:00
Cheng Zhao 846d81abf5 Upgrade to atom-shell@0.16.1 2014-09-08 18:19:59 +08:00
Cheng Zhao a8e4638612 🍎 Add "Services" menu, fixes #3204 2014-09-08 14:49:25 +08:00
Cheng Zhao 4134f5efe4 Upgrade to apm@0.93.0 2014-09-07 10:26:44 +08:00
Cheng Zhao 1c5acc059e Upgrade to atom-shell@0.16.0 2014-09-07 10:24:35 +08:00
pinak222 c01a24f293 Add MimeType text/plain to .desktop file
This adds Atom in open with menu in KDE (possibly other DE's) for text files therefore providing better integration.
2014-09-06 10:59:01 +05:30
Kevin Sawicki 571ce5bddd Upgrade to tree-view@0.115 2014-09-05 18:33:09 -07:00
Kevin Sawicki 5237e687ee 🐧 Add separator after preference items
Closes #3471
2014-09-05 18:16:12 -07:00
Kevin Sawicki fe74dfdf4e Upgrade to apm 0.92.1 2014-09-05 17:57:46 -07:00
Ben Ogle 250c21f00a Deprecate all events from ::on 2014-09-05 17:26:41 -07:00
Ben Ogle e6dbea09fe Add onDidCreateMarker and onDidUpdateMarkers 2014-09-05 17:26:14 -07:00
Ben Ogle 47ef54a072 Subscribe directly to the decoration destroy for removal 2014-09-05 16:53:35 -07:00
Ben Ogle 86e9778adb Remove the decoration changed event 2014-09-05 16:51:26 -07:00
Ben Ogle aeffef30c6 Directly subscribe to the decorations in EditorComponent 2014-09-05 16:49:30 -07:00
Ben Ogle 7ae25d34e7 Decoration Params -> Properties 2014-09-05 16:20:42 -07:00
Ben Ogle e6e6028683 Deprecate decoration events 2014-09-05 15:14:27 -07:00
Ben Ogle f3e8f11d07 Use DisplayBuffer::onDidChangeSoftWrapped in Editor 2014-09-05 13:42:11 -07:00
Ben Ogle 6e8a626de2 Add ::onDidChangeSoftWrapped to DisplayBuffer and Editor 2014-09-05 13:41:46 -07:00
Ben Ogle 21e4d8a064 Add DisplayBuffer::onDidChange 2014-09-05 13:30:59 -07:00
Ivan Žužak 733e06fa8c Use shift in the example rather than explaining the difference 2014-09-05 22:24:42 +02:00
Ben Ogle db84b7952c fix another linter error 2014-09-05 12:44:56 -07:00
Ben Ogle 557562d8c8 Fix linter error 2014-09-05 12:42:33 -07:00
Ivan Zuzak b1fdb48e9e Link to relevant docs in keymap.cson file 2014-09-05 21:40:54 +02:00
Ben Ogle 0a920b18d7 Update TokenizedBUffer::on deprecations 2014-09-05 12:40:33 -07:00
Ben Ogle 289b22c782 Use event methods in TokenizedBuffer spec 2014-09-05 12:40:14 -07:00
Ivan Zuzak 6d498aad3b Explain capital letters in keystrokes 2014-09-05 21:40:11 +02:00
Ben Ogle 53fbfb8b27 Merge decoration-changed and decoration-updated
Only emit the decorations from the events
2014-09-05 12:35:52 -07:00
Ben Ogle a2adbff3e9 Add TokenizedBuffer::onDidTokenize 2014-09-05 12:33:28 -07:00
Ben Ogle 48a68d87f5 Add TextBuffer::onDidChange 2014-09-05 12:26:54 -07:00
Ben Ogle bcc6adff4f No longer need this as the event method passes it through 2014-09-05 12:26:06 -07:00
Ben Ogle 9435f852dd Use new decoration updated event method 2014-09-05 12:25:14 -07:00
Ben Ogle 569c403d56 Update the events on decorations 2014-09-05 12:08:35 -07:00
Nathan Sobo 6ad9531e5c Add Selection::onDidChangeRange and ::onDidDestroy and deprecate ::on 2014-09-05 11:39:34 -07:00
Nathan Sobo 56687027b6 Add Cursor::onDidChangePosition and ::onDidDestroy and deprecate ::on 2014-09-05 11:39:34 -07:00
Nathan Sobo 6bd8702421 Deprecate DisplayBufferMarker::on 2014-09-05 11:39:34 -07:00
Nathan Sobo c69b5fc0a0 Remove specs for ::onDidMoveCursor, which was removed 2014-09-05 11:39:33 -07:00
Nathan Sobo 1131b33a83 Add DisplayBufferMarker::onDidChange and ::onDidDestroy 2014-09-05 11:39:33 -07:00
Nathan Sobo 651eb78315 Add Editor::onDidAdd/RemoveSelection
Also update EditorComponent to use the new ::onDidAddSelection method.
2014-09-05 11:39:33 -07:00
Nathan Sobo 3e77b9b7c0 Eliminate Editor::onDidMoveCursor
If you want to know if a cursor moved, subscribe to the cursor.
2014-09-05 11:39:33 -07:00
Nathan Sobo e77b4a54dd Add Editor::onDidRemoveCursor 2014-09-05 11:39:33 -07:00
Nathan Sobo 3b6e40fbd8 Add Editor::onDidAddCursor 2014-09-05 11:39:33 -07:00
Nathan Sobo 161edfd15a Remove ‘cursors-moved’ event
It event was not document only being used in EditorComponent. Due to
our batching strategy, it’s fine to respond to individual
::onDidMoveCursor events.
2014-09-05 11:39:33 -07:00
Nathan Sobo 2a81687d38 Add Editor::onDidMoveCursor 2014-09-05 11:39:33 -07:00
Nathan Sobo 05ea381c0a Add Editor::onWill/DidInsertText 2014-09-05 11:39:33 -07:00
Nathan Sobo 63c9da02f6 Add Editor::onDidConflict 2014-09-05 11:39:33 -07:00
Nathan Sobo 5a02303b58 Add Editor::onDidStopChanging which delegates to TextBuffer 2014-09-05 11:39:33 -07:00
Nathan Sobo 1c95a55740 Add ::onDidChangeGrammar to Editor, DisplayBuffer, and TokenizedBuffer 2014-09-05 11:39:33 -07:00
Nathan Sobo 3e260eea56 Add Editor::onDidChangeSoftWrapped 2014-09-05 11:39:33 -07:00
Nathan Sobo 965afc2c37 Rename softWrap to softWrapped
Our new pattern for booleans is to have ::set and ::is, and that means
the property name needs to be in passive voice for ::is to make sense.
This is in preparation for adding a new change observation method.

* ::setSoftWrapped
* ::isSoftWrapped
* ::toggleSoftWrapped
2014-09-05 11:39:33 -07:00
Nathan Sobo d15d1572ef Add Editor::onDidChangeModified 2014-09-05 11:36:40 -07:00
Nathan Sobo 133f3f45ab Add Editor::onDidChangePath 2014-09-05 11:36:40 -07:00
Nathan Sobo b731f7cbdc Add Editor::onDidChangeTitle 2014-09-05 11:36:40 -07:00
Ben Ogle 8f6053c53f Upgrade bracket matcher to use new apis
It was really noisy with deprecations
2014-09-05 11:31:40 -07:00
Kevin Sawicki 0c749537a1 Prepare 0.126 2014-09-05 09:39:06 -07:00
Kevin Sawicki f6bb7fc089 Merge pull request #3458 from atom/ks-store-injection-grammars
Include injection grammars in active list
2014-09-05 09:14:41 -07:00
Ben Ogle 805c621ac6 Merge pull request #3459 from atom/bo-remove-editor-view-split-methods
Deprecate EditorView::split* methods
2014-09-04 17:44:22 -07:00
Ben Ogle 7fe567521e Use the model methods in the commands 2014-09-04 17:09:52 -07:00
Ben Ogle e48748122f Suggest better alternative in deprecation warnings 2014-09-04 16:49:33 -07:00
Ben Ogle 1291cf19fb Rename EditorView::getPane -> ::getPaneView() 2014-09-04 16:49:02 -07:00
Ben Ogle 336afc32c2 Add PaneView::getModel() 2014-09-04 16:48:04 -07:00
Ben Ogle a81393320c Support a copyActiveItem param in Pane::split* methods 2014-09-04 16:41:20 -07:00
Kevin Sawicki 3e407296ad 🐎 Upgrade to less-cache@0.14 2014-09-04 16:31:21 -07:00
Kevin Sawicki 7c8451e178 Use getter on GrammarRegistry 2014-09-04 16:09:46 -07:00
Kevin Sawicki 90592a70be Include injection grammars in active list
Prevents an immediate flicker when restarting Atom with editors
open that have injection matches.
2014-09-04 16:04:32 -07:00
Ben Ogle 914e4e6342 Deprecate EditorView::split* methods 2014-09-04 16:00:34 -07:00
Ben Ogle 86e623e9db Merge pull request #3457 from atom/bo-deprecate-editor-view-methods
Deprecate obvious EditorView methods
2014-09-04 15:42:28 -07:00
Ben Ogle 70df5a5c0a Remove unnecessary fixme 2014-09-04 15:30:06 -07:00
Ben Ogle dba1e22ded Deprecate EditorView::setSoftWrap 2014-09-04 15:29:54 -07:00
Ben Ogle dc21e8707f Deprecate EditorView::getFirstVisibleScreenRow 2014-09-04 15:25:55 -07:00
Ben Ogle 52c19a5dcd Deprecate pixelPositionFor*Position 2014-09-04 15:20:20 -07:00
Ben Ogle 5ae040f688 Add Editor::scrollToTop to compliment scrollToBottom() 2014-09-04 15:17:17 -07:00
Ben Ogle c511a71488 Deprecate EditorView::scrollToBottom 2014-09-04 15:17:01 -07:00
Ben Ogle 04b0ed9704 Deprecate EditorView::scrollTo*Position() functions 2014-09-04 15:14:38 -07:00
Ben Ogle 2c9241506b Fix doc strings 2014-09-04 14:53:33 -07:00
Kevin Sawicki 326f5fc646 Upgrade to settings-view@0.142 2014-09-04 14:29:15 -07:00
Nathan Sobo 705c57158d Merge pull request #3454 from atom/ns-text-buffer-event-methods
Add event subscription methods to TextBuffer and Marker
2014-09-04 15:17:55 -06:00
Nathan Sobo a50f62dc93 Merge remote-tracking branch 'origin/master' into ns-text-buffer-event-methods
Conflicts:
	package.json
2014-09-04 14:40:52 -06:00
Kevin Sawicki eb9d4ba816 📝 Use ### for example sections 2014-09-04 13:40:04 -07:00
Nathan Sobo 6cb085b341 Upgrade text-buffer again to fix specs 2014-09-04 14:15:42 -06:00
Ivan Žužak 1ffe459b1e Merge pull request #3455 from atom/iz-remove-deprecated-calls-check
Remove check for deprecated function calls
2014-09-04 22:02:51 +02:00
Nathan Sobo effe7e8070 Upgrade find-and-replace for spec fixes 2014-09-04 14:00:14 -06:00
Ivan Žužak b5676adf8a Remove check for deprecated function calls 2014-09-04 21:52:00 +02:00
Ivan Žužak 1909f24d5c Merge pull request #3433 from atom/iz-gutter-click-select-line
Support selecting rows by clicking and meta-clicking the gutter
2014-09-04 21:35:31 +02:00
Nathan Sobo a947a357f4 Upgrade text-buffer for event subscription methods 2014-09-04 12:44:53 -06:00
Kevin Sawicki d8be03850b Merge pull request #3443 from atom/ks-upgrade-fuzzaldrin
Upgrade fuzzaldrin
2014-09-04 09:20:39 -07:00
Kevin Sawicki 641698330f Upgrade to fuzzy-finder@0.58 2014-09-04 09:02:38 -07:00
Kevin Sawicki 55913626cc Upgrade to fuzzaldrin 2.1 2014-09-04 09:02:38 -07:00
Ivan Zuzak af2f155082 Merge branch 'master' into iz-gutter-click-select-line 2014-09-04 16:22:51 +02:00
Nathan Sobo b9e90f2fdd Fix editor observation docs 2014-09-04 08:06:19 -06:00
Nathan Sobo 621c247a75 Merge pull request #3418 from atom/ns-simplify-events
Clean Up Workspace Event Subscription API
2014-09-04 07:47:55 -06:00
Nathan Sobo 2f6f374cc7 Upgrade event-kit to stop throwing when emitting on disposed emitters 2014-09-04 07:02:35 -06:00
Nathan Sobo aac64e3a9b Document Workspace::onDidOpen 2014-09-04 07:01:32 -06:00
Nathan Sobo 9de0ba17b2 Add Workspace::onDidOpen event subscription method 2014-09-04 06:57:59 -06:00
Nathan Sobo 57699e6245 Use Workspace::getActivePane instead of property in spec 2014-09-04 06:57:46 -06:00
Ivan Zuzak 8a6e72f21f Respect preserveFolds attribute when creating selections from markers 2014-09-04 13:57:41 +02:00
Paul Betts 7b9b044394 Let's not create an installer unless asked, it takes foreeeeevvvverr 2014-09-03 20:30:15 -07:00
Paul Betts 23cb0eda2f How embarassing 2014-09-03 20:15:28 -07:00
Paul Betts a354d9f880 Add create-installer to default tasks 2014-09-03 20:01:16 -07:00
Paul Betts 7526038f9a Create a task which builds an installer 2014-09-03 20:01:16 -07:00
Paul Betts c0973f8c0f Create the first hack at an installer spec 2014-09-03 19:01:08 -07:00
Nathan Sobo 0f912c97b9 Upgrade emissary to call prefer calling ::dispose in Subscriber mixin 2014-09-03 19:37:42 -06:00
Nathan Sobo 4946eec367 Merge remote-tracking branch 'origin/master' into ns-simplify-events
Conflicts:
	docs/your-first-package.md
2014-09-03 19:31:37 -06:00
Nathan Sobo db571a2fbf Avoid deprecation by calling ::getActivePaneItem 2014-09-03 19:26:19 -06:00
Nathan Sobo 22c62b3107 Replace ‘editor-created’ event with ::onDidAddTextEditor 2014-09-03 19:26:07 -06:00
Nathan Sobo 83327eeabb Don’t test for editor-created events when editor is copied
We can handle this through ::onDidAddTextEditor when the copy is added
back to the pane.
2014-09-03 19:25:40 -06:00
Ben Ogle 8e286194f1 Merge pull request #3446 from atom/bo-move-var
Add columnCount variables to cursor::moveLeft and moveRight and related methods
2014-09-03 17:36:31 -07:00
Ben Ogle 691c7ee585 Considerably more elegant (and correct) moveLeft and moveRight 2014-09-03 17:19:06 -07:00
Paul Betts dededd80dd Add Squirrel.Windows 0.4.92 2014-09-03 16:57:22 -07:00
Ben Ogle 48b693c1c1 Add columnCounts to selection methods 2014-09-03 16:20:25 -07:00
Ben Ogle 7a3893c7bb Update doc strings 2014-09-03 16:10:33 -07:00
Ben Ogle 06165b2167 Remove the max call 2014-09-03 16:10:33 -07:00
Ben Ogle f82c59d865 Add columnCount to moveRight 2014-09-03 16:10:33 -07:00
Ben Ogle 29f15d0f20 Make moveLeft() with huge values span multiple rows 2014-09-03 16:10:33 -07:00
Ben Ogle 99c07decf2 Add columnCount var to Editor::moveLeft and Cursor::moveLeft 2014-09-03 16:10:33 -07:00
Ben Ogle 851034c8d3 Failing test 2014-09-03 16:10:33 -07:00
Ben Ogle 3a85148f69 Fix doc strings 2014-09-03 16:10:33 -07:00
Nathan Sobo f87f7c358a Kill a couple deprecation errors 2014-09-03 17:08:13 -06:00
Ben Ogle df579a9295 Merge pull request #3445 from atom/bo-line-for-row
lineForRow changes
2014-09-03 16:07:42 -07:00
Ben Ogle b90670ff2d Gracefully handle the case when there is no screenline 2014-09-03 16:00:57 -07:00
Nathan Sobo 67dc703c18 💄 docs 2014-09-03 16:46:53 -06:00
Nathan Sobo c508f76af0 Upgrade event-kit for deprecated .off on subscriptions 2014-09-03 16:40:18 -06:00
Nathan Sobo a8c1f2d0a5 Deprecate Workspace methods 2014-09-03 16:37:36 -06:00
Nathan Sobo 7ad992e52f 💄 2014-09-03 16:35:46 -06:00
Nathan Sobo 87fb0b46f7 Deprecate theorist-provided behaviors in Pane 2014-09-03 16:31:14 -06:00
Nathan Sobo 873818ee52 Deprecate string-based event subscriptions 2014-09-03 16:21:42 -06:00
Ben Ogle 523a255e48 Add Editor::lineTextForScreenRow()
Closes #3055
2014-09-03 14:42:46 -07:00
Ben Ogle 5e21d1ca5b Deprecate Editor::lineLengthForBufferRow 2014-09-03 14:42:46 -07:00
Ben Ogle 0703788209 Editor::linesForScreenRows -> ::tokenizedLinesForScreenRows 2014-09-03 14:42:46 -07:00
Ben Ogle c0c941b8db lineForBufferRow -> lineTextForBufferRow 2014-09-03 14:42:46 -07:00
Ben Ogle e3a0339fe3 Editor::lineForScreenRow -> ::tokenizedLineForScreenRow 2014-09-03 14:42:46 -07:00
Ben Ogle c4265776b3 Rename unused method 2014-09-03 14:42:46 -07:00
Ben Ogle ae49fd50b7 DisplayBuffer::linesForRows -> ::tokenizedLinesForScreenRows
Clarity!
2014-09-03 14:42:46 -07:00
Ben Ogle cdbbec91f0 row -> bufferRow for clarity 2014-09-03 14:42:45 -07:00
Ben Ogle dbb0ff9830 Remove unused method 2014-09-03 14:42:45 -07:00
Ben Ogle 99f899dc4a lineForScreenRow -> tokenizedLineForRow
The method was severely mislabeled
2014-09-03 14:42:45 -07:00
Ben Ogle 2b9b4a48ef tokenizedLineForRow -> tokenizedLineForScreenRow 2014-09-03 14:42:45 -07:00
Ben Ogle b516f5a74d lineForBufferRow -> lineTextForBufferRow 2014-09-03 14:42:45 -07:00
Ben Ogle 05bbc480b0 displayBuffer::lineForRow -> tokenizedLineForRow 2014-09-03 14:42:45 -07:00
Ben Ogle c0e2ed4282 Fix comments 2014-09-03 12:04:21 -07:00
Ben Ogle d3c2cd756a Fix comment 2014-09-03 12:01:36 -07:00
Kevin Sawicki 1ff9da5f7a Upgrade to markdown-preview@0.101 2014-09-03 11:31:41 -07:00
Nathan Sobo d3422786c3 Unmount component when EditorView is detached
Fixes #3431

When a pane item is moved to another pane, we *detach* the associated
view but we don’t fully remove it. This was to prevent removing a view
when it was used as the pane item directly. However, this was causing
the editor component not to be unmounted, which caused leaks and
incorrect measurements.

We need to unmount the component, but we don’t want to destroy the
editor. So I’ve moved editor destruction to the wrapper view for now,
and I only do it when the view is actually removed.

Ultimately, we need to have a 1:1 relationship with pane items and their
views and only allow a pane item to appear once in the pane tree. Then
we can recycle the same view and avoid this confusing situation where
the old view is detached and a new view is created.
2014-09-03 11:42:56 -06:00
Ivan Zuzak ebbfaa23ce Preserve folds when selecting rows by clicking the gutter 2014-09-03 18:54:46 +02:00
Ivan Zuzak 29ad748aa4 Dont propagate fold icon clicks to editor component 2014-09-03 18:52:50 +02:00
Nathan Sobo d753a7f38d Merge pull request #3440 from atom/ns-exclusive-selection-intersection
Don’t merge adjacent non-empty selections
2014-09-03 09:24:05 -06:00
Ben Ogle 1e4fb5b4bc nof 2014-09-02 17:44:01 -07:00
Nathan Sobo cfd2722348 Don’t merge adjacent non-empty selections
This improves the behavior of #3433
2014-09-02 18:10:05 -06:00
Ben Ogle ae0bffc4ea Fix some doc strings 2014-09-02 17:01:20 -07:00
Ben Ogle 3d8f3883d1 Upgrade deprecation cop to remove the status bar icon. 2014-09-02 16:52:22 -07:00
Ben Ogle 81532d52f7 Move select all fn so docs read better 2014-09-02 16:45:49 -07:00
Ben Ogle 0b34e46a1a Merge pull request #3420 from atom/bo-update-cursor-selection-apis
Update cursor and selection APIs
2014-09-02 16:41:42 -07:00
Ben Ogle 539e4e0745 Upgrade fnr to fix specs 2014-09-02 15:10:38 -07:00
Ben Ogle 1f925078e9 Remove deprecation 2014-09-02 14:59:06 -07:00
Ben Ogle a564da1eb0 Remove unnecessary deprecated methods 2014-09-02 14:58:20 -07:00
Ben Ogle dca36d1307 Reorder return values of getSelectedBufferRanges
The implementation does not depend on a specific order, just the test
2014-09-02 14:55:02 -07:00
Ben Ogle 3f67252757 Add row count docs 2014-09-02 14:50:15 -07:00
Ben Ogle a7db555030 Order the getting ranges / positions by their insertion order 2014-09-02 14:38:11 -07:00
Kevin Sawicki 3bd7edb94e Upgrade to language-sass@0.21 2014-09-02 14:25:40 -07:00
Kevin Sawicki a9227b5f43 Upgrade to language-less@0.15 2014-09-02 14:22:51 -07:00
Ben Ogle 659c05c825 Add selectToBufferPosition 2014-09-02 14:09:56 -07:00
Ben Ogle 5ea64f8b11 selectWord() -> selectWordsContainingCursors() 2014-09-02 14:03:57 -07:00
Ben Ogle 70af6198bd selectLine -> selectLinesContainingCursors 2014-09-02 14:02:26 -07:00
Kevin Sawicki 1aa391a207 Don't load ~/.atom/init.coffee in safe mode
This ensures the code from the init script isn't causing issues
when trying to reproduce something in safe mode.

Refs #2772
2014-09-02 13:51:26 -07:00
Kevin Sawicki 03a6d10703 Upgrade to tree-view@0.114 2014-09-02 13:44:13 -07:00
Kevin Sawicki 24add494ae Normalize project path in Project::setPath
This will remove consecutive slashes as well as . and ..
characters and make path comparisons accurate.

Closes atom/tree-view#191
2014-09-02 10:49:02 -07:00
Nathan Sobo c5aa446bc2 Prevent focusout events on hidden input when clicking focused editors
Fixes #3384

This is achieved by calling .preventDefault() on mousedown events when
the editor is already focused, which prevents the moving of focus to
the editor itself.
2014-09-02 11:37:46 -06:00
Kevin Sawicki fbcef99aac Upgrade to language-todo@0.11 2014-09-02 09:04:49 -07:00
Kevin Sawicki 8fa8519924 Upgrade to language-python@0.19 2014-09-02 08:56:04 -07:00
Kevin Sawicki 5a36988930 Upgrade to language-xml@0.19 2014-09-02 08:49:06 -07:00
Ivan Zuzak 65cae0f68d Fix indentation to make coffeelint happy 2014-09-01 18:24:04 +02:00
Ivan Zuzak 7f14965ca8 Support selecting multiple rows with meta-click 2014-09-01 17:42:55 +02:00
Ivan Zuzak 8c36d2673b Select row when clicking the gutter 2014-08-30 20:20:09 +02:00
Kevin Sawicki 7f2d9984b8 Upgrade to language-go@0.17 2014-08-29 11:30:06 -07:00
Kevin Sawicki d43702f017 🐎 Use direct comparison instead of regex 2014-08-29 09:55:50 -07:00
Kevin Sawicki 690d32cca9 Document undefined case 2014-08-29 09:42:51 -07:00
Kevin Sawicki d870cb8f36 Return undefined to ? fallback works 2014-08-29 09:42:01 -07:00
Kevin Sawicki 7cd080786c Return a boolean like the comment says 2014-08-29 09:40:55 -07:00
Kevin Sawicki a8a251c457 💄 2014-08-29 09:36:55 -07:00
Kevin Sawicki 9574458feb 📝 💄 2014-08-29 09:34:59 -07:00
Kevin Sawicki 692bf534b6 Merge pull request #3369 from khakionion/master
Better autodetection of Soft Tabs.
2014-08-29 09:34:01 -07:00
Kevin Sawicki f35346c507 Upgrade to tree-view@0.113 2014-08-29 09:15:34 -07:00
Kevin Sawicki 78f7ff6ee7 Focus existing window after opening path 2014-08-29 09:10:12 -07:00
Kevin Sawicki 71470f88ad Merge pull request #3409 from syndbg/master
Added linux open-folder keybind.
2014-08-29 08:32:07 -07:00
Ben Ogle 4b4af946cf Fix specs 2014-08-28 18:30:08 -07:00
Ben Ogle 5163d0f810 Fix dupe functions 2014-08-28 18:19:12 -07:00
Ben Ogle 08388d87c0 Remove getSelectionAtIndex
We’re going to eventually get rid of the clone in 
getSelections / getCursors freeze those properties 
and return them directly. Then they can operate 
on the list garbage free.
2014-08-28 18:16:33 -07:00
Ben Ogle 9c53d6f014 Deprecate getCursor() 2014-08-28 18:10:18 -07:00
Nathan Sobo c9e5ff6606 Organize workspace API into sections. Add ::getActiveTextEditor 2014-08-28 19:06:57 -06:00
Ben Ogle 2fced0c1bc Deprecate getSelection 2014-08-28 17:51:16 -07:00
Ben Ogle 271af5dd99 Add Editor::setSelectedScreenRanges() 2014-08-28 17:28:24 -07:00
Nathan Sobo 6c2bb26e77 Add Workspace::observeTextEditors and ::onDidAddTextEditor 2014-08-28 18:28:10 -06:00
Nathan Sobo 70a23b0107 Add Workspace::getPanes and ::getPaneItems 2014-08-28 18:27:13 -06:00
Ben Ogle c6a76e6c62 De public a non-used method 2014-08-28 16:59:10 -07:00
Ben Ogle 535724fa84 Nothing uses this function, not internal nor packages. 2014-08-28 16:58:59 -07:00
Ben Ogle 14dcf50683 De-public a couple unused methods 2014-08-28 16:53:44 -07:00
Ben Ogle 882261e782 Break into Essential and extended 2014-08-28 16:53:21 -07:00
Nathan Sobo acb9bdaf33 Add pane and pane item observer methods to workspace. Also document. 2014-08-28 17:52:30 -06:00
Ben Ogle 713d82a895 Reorder selections section 2014-08-28 16:51:31 -07:00
Nathan Sobo a33706ddbc Add PaneContainer::onDidAddPaneItem and ::observePaneItems 2014-08-28 17:42:12 -06:00
Ben Ogle 2551313b58 Deprecate methods on cursor 2014-08-28 16:31:10 -07:00
Nathan Sobo 877fa40a49 Activate next pane on before invoking onDidDestroy observers 2014-08-28 17:23:49 -06:00
Nathan Sobo cee7539e35 Add PaneContainer::observePanes and ::onDidAddPane 2014-08-28 17:22:28 -06:00
Ben Ogle 7ca5ece68a Add methods to be symmetrical with selections
* getCursorsOrderedByBufferPosition
* getCursorBufferPositions
* getCursorScreenPositions
2014-08-28 16:06:44 -07:00
Nathan Sobo 5471e9bccc Add PaneContainer::onDidDestroyPaneItem 2014-08-28 16:58:38 -06:00
Nathan Sobo b60b9f3e3a Add Pane::observeItems 2014-08-28 16:40:54 -06:00
Nathan Sobo 12f78dd957 💄 2014-08-28 16:27:20 -06:00
Ben Ogle e74244fc25 Move less used function down in the order 2014-08-28 15:25:35 -07:00
Ben Ogle 65ba95a449 Add missing docs 2014-08-28 15:25:23 -07:00
Ben Ogle 370ad23f7c Remove Cursor from ::moveCursor* methods 2014-08-28 15:25:12 -07:00
Nathan Sobo cea4db5381 Break pane API into sections 2014-08-28 16:24:53 -06:00
Nathan Sobo 345617e0f3 Clean up existing pane API docs 2014-08-28 15:57:30 -06:00
Nathan Sobo 78c24fb737 Remove legacy event documentation 2014-08-28 15:54:16 -06:00
Ben Ogle 01b48d2a0a Move adding cursor functions under more heavily used functions 2014-08-28 14:44:23 -07:00
Ben Ogle 45a9bd21fc Deprecate getCursorScreenRow
It’s out of place, and unnecessary.
2014-08-28 14:43:36 -07:00
Ben Ogle db83375293 Buffer before screen, get before set 2014-08-28 14:38:58 -07:00
Ben Ogle a4a25576a2 Split cursor methods into essential and extended 2014-08-28 14:35:39 -07:00
Nathan Sobo e88eb3012e Document Pane event subscription methods 2014-08-28 15:32:02 -06:00
Nathan Sobo d7063c0932 Add Pane::onDidDestroy 2014-08-28 15:21:35 -06:00
Nathan Sobo 34cb5d6012 Don’t implement ::isActive in terms of the theorist model behavior 2014-08-28 15:21:10 -06:00
Nathan Sobo 95e9686b37 Emit legacy item-added DOM event correctly 2014-08-28 14:42:13 -06:00
Nathan Sobo b1916069de Delegate ::getActivePane[Item] directly to PaneContainer 2014-08-28 14:42:13 -06:00
Nathan Sobo 9223361c22 Add PaneContainer::onDidChange/observeRoot
Also, don’t use a behavior to monitor root changes
2014-08-28 14:42:13 -06:00
Nathan Sobo 7556b85806 Remove/add the *subscription*, not the child 2014-08-28 14:42:12 -06:00
Nathan Sobo b74554ad4c Actually subscribe 2014-08-28 14:42:12 -06:00
Nathan Sobo b34367ad44 💄 pane-container-spec 2014-08-28 14:42:12 -06:00
Nathan Sobo cf3e1177ab Upgrade event-kit to fix stupid bug 2014-08-28 14:42:12 -06:00
Nathan Sobo 74b2f26540 Add PaneContainer::onDidChangeActivePaneItem 2014-08-28 14:41:56 -06:00
Nathan Sobo b89202f82c Dispose of PaneAxis subscriptions when destroyed 2014-08-28 14:41:56 -06:00
Nathan Sobo 9487609f0c 💄 pane-container-spec 2014-08-28 14:41:56 -06:00
Nathan Sobo da63c6bab2 Add ::onDidDestroy to Pane and PaneAxis 2014-08-28 14:41:56 -06:00
Ivan Žužak a00b3b2cc9 Merge pull request #3394 from atom/iz-builtin-context-menu-commands
Add cut/copy/paste built-in context menu items
2014-08-28 20:41:21 +02:00
Ben Ogle 0888d8ac60 Upgrade atom-dark-ui 2014-08-28 11:27:45 -07:00
Ben Ogle b895f7074d Upgrade find and replace to remove deprecation 2014-08-28 11:19:40 -07:00
Ivan Zuzak 7b73d6749d Add undo, redo, delete and select all commands to context menu 2014-08-28 20:13:16 +02:00
Nathan Sobo 67c3a41a60 Upgrade event-kit to fix bug and get CompositeDisposable::remove 2014-08-28 11:43:33 -06:00
Nathan Sobo c25ab0db43 Rename ::disposables to ::subscriptions in PaneView
Now that emissary’s Subscriber no longer conflicts with the name
2014-08-28 11:43:09 -06:00
Nathan Sobo 9979ae4b09 Add child event methods to PaneAxis
This eliminates our reliance on the Sequence object for informing us
of changes
2014-08-28 11:43:09 -06:00
Nathan Sobo a9294aebc3 Don’t use Sequence in PaneAxis 2014-08-28 11:43:09 -06:00
Nathan Sobo f161f5352e Don’t rely on Sequences to reparent the last child 2014-08-28 11:43:09 -06:00
Nathan Sobo 4f826a70f8 Use Array instead of Sequence for Pane::items 2014-08-28 11:43:08 -06:00
Nathan Sobo 1d365db9df Use getActiveItem getter in pane-view-spec 2014-08-28 11:43:08 -06:00
Nathan Sobo b9feed8eb4 Handle objects in subscriptions instead of multiple args 2014-08-28 11:43:08 -06:00
Nathan Sobo 475dc6074c 💄 2014-08-28 11:43:08 -06:00
Nathan Sobo 40d93cd0cf Use Pane::setActiveItem internally so observers are invoked 2014-08-28 11:43:08 -06:00
Nathan Sobo 99d70b4a4e Don’t emit ::onDidChangeActiveItem events unless it really changes 2014-08-28 11:43:08 -06:00
Nathan Sobo 87cdc1a45d Don’t invoke ::onDidChangeActivePane events unless it really changes 2014-08-28 11:43:08 -06:00
Nathan Sobo e7a7e86dea Add Pane::observeActive and ::observeActiveItem
These have behavior semantics, invoking the observer immediately with
the current value of the observed property.
2014-08-28 11:43:07 -06:00
Nathan Sobo b6c669a292 Subscribe with new event methods in PaneView 2014-08-28 11:43:07 -06:00
Nathan Sobo 44d70aaa5b Add Pane::onDidChangeActive() 2014-08-28 11:43:07 -06:00
Nathan Sobo 2b63f8a4ee Add PaneContainer::onDidChangeActivePane 2014-08-28 11:43:07 -06:00
Nathan Sobo 8225f759bf Add Pane::onWillDestroyItem() 2014-08-28 11:43:07 -06:00
Nathan Sobo 2d58d9c8b5 Add Pane::onDidActivate 2014-08-28 11:43:07 -06:00
Nathan Sobo 548018e9b2 Add spec for onDidRemoveItem observers when moving items to other panes 2014-08-28 11:43:07 -06:00
Nathan Sobo 9bd2eec4bc Add Pane::onDidMoveItem() 2014-08-28 11:43:07 -06:00
Nathan Sobo b8fcbe9451 Start adding event subscription methods to pane
This branch uses EventKit, an ultra-simple library for implementing
events. The object implementing the methods maintains its own emitter
object rather than doing a mixin like Emissary encourages. This will
make it easier for us to deprecate ::on on the object itself. Unlike
emissary, the EventKit Emitter implements a super minimalistic API that
only allows one value to be emitted and always returns a Disposable
from subscriptions.
2014-08-28 11:43:06 -06:00
Ivan Zuzak 861dff107a 💄 simplify assignment using coffeescript magic 2014-08-28 19:42:59 +02:00
Nathan Sobo ebb02bcd37 Use public getters instead of properties in pane-spec 2014-08-28 11:42:42 -06:00
syndg fcb72049e1 Added linux open-folder keybind.
Moved application:open-dev to `ctrl-alt-o`
2014-08-28 14:05:42 +03:00
Michael Herring 039e61e960 updated regex in usesSoftTabs to only look for Tab and Space 2014-08-28 17:44:49 +09:00
Michael Herring 002f9ca2b1 merge latest upstream master 2014-08-28 17:35:09 +09:00
Ben Ogle 726b04ef80 Update find-and-replace 2014-08-27 19:21:49 -07:00
Kevin Sawicki 20b64dd744 Upgrade to tabs@0.50 2014-08-27 15:26:31 -07:00
Kevin Sawicki a3d2924484 Split on whitespace 2014-08-27 14:43:23 -07:00
Kevin Sawicki d225966374 installSize -> installedSize 2014-08-27 14:35:16 -07:00
Kevin Sawicki 6d23fa1620 🐧 Set installedSize value in control file
Closes #2183
2014-08-27 14:23:09 -07:00
Kevin Sawicki 682d84dea0 Log location of created .deb file 2014-08-27 14:09:57 -07:00
Kevin Sawicki 969e5b65df Upgrade to welcome@0.18 2014-08-27 12:36:36 -07:00
Kevin Sawicki 8e5f4ced21 🐧 Move settings items to Edit menu
Closes #2467
2014-08-27 12:34:48 -07:00
Ben Ogle bbdd304834 Merge pull request #3229 from atom/docs-metadata
New API docs
2014-08-27 11:33:04 -07:00
Kevin Sawicki 5360b719f2 Upgrade to oniguruma 3.0.4 2014-08-27 11:29:14 -07:00
Kevin Sawicki 17a9e397f3 🐧 Add ~/.atom open commands to File menu 2014-08-27 11:10:30 -07:00
Kevin Sawicki f01f0eb90b Upgrade to language-sass@0.20 2014-08-27 10:57:33 -07:00
Kevin Sawicki 53d16098ca Merge pull request #3396 from syndbg/master
Added missing keybind in linux.cson.
2014-08-27 10:17:25 -07:00
Ben Ogle cb34539508 Fix syntax highlighting 2014-08-27 09:36:08 -07:00
syndg 1221a140aa Added missing keybind in linux.cson.
`'ctrl-,': 'application:show-settings'` exists in `win32.cson` and `darwin32.cson`
2014-08-27 17:10:08 +03:00
Ivan Zuzak 776a8e935a Add cut/copy/paste built-in context menu items 2014-08-27 13:55:44 +02:00
Ivan Zuzak 096255f283 Support built-in context menu items 2014-08-27 13:54:55 +02:00
Ben Ogle 327749b6c5 Upgrade packages in the public docs.
They now are on the latest grunt-atomdoc and have docstrings that export
well
2014-08-26 19:23:51 -07:00
Kevin Sawicki cd3bd048fd Merge pull request #3389 from atom/ks-spec-task-on-linux
Add spec task on Linux
2014-08-26 18:38:34 -07:00
Ben Ogle d79807fbe5 Document atom.* globals as properties 2014-08-26 16:00:35 -07:00
Ben Ogle 7a67619216 Use donna 1.0 2014-08-26 15:59:53 -07:00
Kevin Sawicki 496e49a5b9 Use correct process name on Linux 2014-08-26 15:10:43 -07:00
Kevin Sawicki 08decbe533 Explicitly set app path perms to 755 on Linux 2014-08-26 14:59:42 -07:00
Kevin Sawicki 37fc8b5945 Add initial spec task support on linux 2014-08-26 14:59:42 -07:00
Kevin Sawicki f88c805466 Upgrade to markdown-preview@0.100 2014-08-26 14:59:28 -07:00
Kevin Sawicki e8cd59eaef Waits for reloaded event from ThemeManager
Previously disabling a theme wouldn't wait for the full reload
to finish since and the spec would intermittently fail because
the promise was fulfilled after the spec completed and the
subscription was leaked.
2014-08-26 14:23:20 -07:00
Kevin Sawicki 600005de15 Upgrade to go-to-line@0.25 2014-08-26 14:21:14 -07:00
Kevin Sawicki aaa788b8da Upgrade to settings-view@0.141 2014-08-26 12:53:44 -07:00
Kevin Sawicki 9a70fdc3d9 Prepare 0.125 2014-08-26 12:04:27 -07:00
Ben Ogle 48f161b63a Merge pull request #3388 from atom/bo-remove-all-old-editor
Remove ancillary old editor views
2014-08-26 11:39:51 -07:00
Kevin Sawicki f032dacebb Upgrade to background-tips@0.16 2014-08-26 11:24:10 -07:00
Ben Ogle a296364e53 Fixup doc strings that don’t parse correctly
We can’t have a huge indent on the second line of a list item. Markdown
parses it as a code block. :(
2014-08-26 10:47:36 -07:00
Kevin Sawicki 5ba86b3dbc Normalize file paths in Project::resolve
This ensures the drive case letter is consistent on Windows
when opening file paths from the command line.
2014-08-26 10:22:20 -07:00
Ben Ogle 790f134d7c Remove ancillary old editor views 2014-08-26 10:07:18 -07:00
Kevin Sawicki 32353a31eb Only restore window when it is minimized
Restoring a maximized windows on Windows unmaximizes it.

Closes #3381
2014-08-26 09:55:22 -07:00
Nathan Sobo 0bae432109 Revert "Merge the react and non-react editor styles"
This reverts commit 01c4fe5340.
2014-08-26 09:24:44 -06:00
Ben Ogle d8a4280df1 Upgrade text-buffer for updated doc strings 2014-08-25 19:05:50 -07:00
Nathan Sobo dccb2c295c Update status bar to fix specs 2014-08-25 18:48:03 -06:00
Nathan Sobo 2a94e4a33c Pass tokenizedLines to LinesComponent so measuring stays in sync
Fixes #3318
2014-08-25 18:16:45 -06:00
Nathan Sobo 3371ceadf3 Add regression coverage for remeasuring characters w/ requested update
The problem here is that the lines in the editor no longer reflect the
lines on screen, but we're looking for line nodes corresponding to the
editor's current contents.
2014-08-25 18:16:38 -06:00
Nathan Sobo 070ca1a4bb Call checkForVisibilityChange when showing editors via EditorView::show/hide 2014-08-25 18:16:29 -06:00
Kevin Sawicki 157a753bfb Upgrade to space-pen 3.4.3 2014-08-25 16:36:53 -07:00
Nathan Sobo 0849f1ea84 Perform a sync update after editor becomes visible
This pauses updates during measurements. If any updates were requested
while measuring, we force an update synchronously to prevent flicker.

This commit also removes the visibility check before updating, because
we can't force an update from this spot in the lifecycle. This shouldn't
be needed anyway because we are polling for visibility changes.
2014-08-25 17:31:29 -06:00
Nathan Sobo c4f5a3516b Assign atom.lastUncaughtError in window.onerror handler 2014-08-25 16:36:14 -06:00
Kevin Sawicki 08f39c6a5a Upgrade to atom-keymap@2.0.4 2014-08-25 15:35:47 -07:00
Kevin Sawicki 69aa34954f Remove call to no-op EditorView method 2014-08-25 15:31:39 -07:00
Ben Ogle d6d7d3942c 📝 Convert EditorView docs 2014-08-25 15:26:38 -07:00
Ben Ogle c3acd8cf0c 📝 Convert workspaceView docs 2014-08-25 15:13:46 -07:00
Ben Ogle 12f58f0478 📝 Convert workspace docs 2014-08-25 15:13:45 -07:00
Ben Ogle 66e6a481a4 📝 Convert ThemeManager docs 2014-08-25 15:13:45 -07:00
Ben Ogle de27dce6bf Convert SelectListView docs 2014-08-25 15:13:45 -07:00
Ben Ogle 6c19a58c7c 📝 Convert Project docs 2014-08-25 15:13:45 -07:00
Ben Ogle c294208f87 📝 Convert PaneView docs 2014-08-25 15:13:45 -07:00
Ben Ogle d7f3add250 📝 Convert Pane docs 2014-08-25 15:13:45 -07:00
Ben Ogle a93ef05e13 📝 Convert Selection docs 2014-08-25 15:13:45 -07:00
Kevin Sawicki 8241918b6e Include classes from node_modules in proper object and order 2014-08-25 15:13:45 -07:00
Ben Ogle 8aae7b983e 📝 Convert Cursor Docs 2014-08-25 15:13:45 -07:00
Ben Ogle ad4f464d7c Fix Decoration events 2014-08-25 15:13:45 -07:00
Ben Ogle 352f1e34ab No mo : 2014-08-25 15:08:46 -07:00
Kevin Sawicki 2cdae3c6c1 Upgrade to pathwatcher 2.0.9 2014-08-25 15:08:46 -07:00
Kevin Sawicki 5df944e804 📝 Update Task docs 2014-08-25 15:08:46 -07:00
Kevin Sawicki 762f8c2e5a 📝 Update Syntax docs 2014-08-25 15:08:46 -07:00
Kevin Sawicki 41c96a82a9 Upgrade to first-mate 2.0.4 2014-08-25 15:08:46 -07:00
Ben Ogle 5a51d3a0c9 Fix indentation 2014-08-25 15:08:46 -07:00
Ben Ogle d79eb8eed3 Update decoration docs 2014-08-25 15:08:46 -07:00
Ben Ogle 9bb6bdf666 Update decorateMarker docs 2014-08-25 15:08:46 -07:00
Ben Ogle 0ab282340f Upgrade to tello@0.2 2014-08-25 15:08:45 -07:00
Ben Ogle 393f6bdd35 Add optional to all optional args 2014-08-25 15:08:45 -07:00
Ben Ogle a4b2f3aa4b Editor event documentation 2014-08-25 15:08:45 -07:00
Kevin Sawicki ee4c7e996f 📝 Convert ScrollView docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki 59bf16fed3 📝 Convert PackageManager docs 2014-08-25 15:08:45 -07:00
Ben Ogle 99917a536e Add a couple events for test purposes 2014-08-25 15:08:45 -07:00
Ben Ogle 61a82fa0e4 Upgrade tello to use new events format 2014-08-25 15:08:45 -07:00
Kevin Sawicki 0bca0810b9 📝 Convert MenuManager docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki 7d910000a2 📝 Convert DeserializerManager docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki af67671f60 📝 Convert ContextMenuManager docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki 0079007bb6 📝 Convert Config docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki c2fa20c543 📝 Convert Clipboard docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki aa5870570f 📝 Convert BufferedProcess docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki 0e0d62b54c 📝 Convert BufferedNodeProcess docs 2014-08-25 15:08:45 -07:00
Kevin Sawicki 37542e3117 📝 Convert Atom docs 2014-08-25 15:08:44 -07:00
Kevin Sawicki 90e89ebaf9 📝 Convert Git docs 2014-08-25 15:07:15 -07:00
Ben Ogle e4939a8d6d Add sections to editor docs 2014-08-25 15:07:15 -07:00
Kevin Sawicki 50ddb8e3cc Upload atom-api.json asset during publish 2014-08-25 15:04:22 -07:00
Kevin Sawicki c61e36c7d3 Remove donnatello output 2014-08-25 15:04:22 -07:00
Kevin Sawicki 3035242daf Task is no longer async 2014-08-25 15:04:22 -07:00
Kevin Sawicki cfc965c135 Write to docs/output/api.json 2014-08-25 15:04:22 -07:00
Kevin Sawicki 1bc879a9b0 Remove copy-docs unused task 2014-08-25 15:04:22 -07:00
Kevin Sawicki 6225acbe8b Genrate docs from local api.json files 2014-08-25 15:04:22 -07:00
Kevin Sawicki bdf68ba15f Upgrade to theorist 1.0.2 2014-08-25 15:04:22 -07:00
Kevin Sawicki bbef8083d5 Upgrade to text-buffer 3.0.2 2014-08-25 15:04:21 -07:00
Kevin Sawicki f2f88cb343 Upgrade to space-pen 3.4.2 2014-08-25 15:04:21 -07:00
Kevin Sawicki a42de1e9be Upgrade to pathwatcher@2.0.8 2014-08-25 15:04:21 -07:00
Kevin Sawicki 1c97eb977e 💄 2014-08-25 15:04:21 -07:00
Kevin Sawicki d13fd495e4 Upgrade to first-mate 2.0.3 2014-08-25 15:04:21 -07:00
Kevin Sawicki c49ef1fd9d Parse all api.json files in node_modules 2014-08-25 15:04:21 -07:00
Ben Ogle e011be3428 Update argument lists in editor.coffee 2014-08-25 15:04:21 -07:00
Kevin Sawicki f993b78479 Remove unused deploy-docs task 2014-08-25 15:04:21 -07:00
Ben Ogle 86ef06ebb1 Update to contain superclasses 2014-08-25 15:04:21 -07:00
Ben Ogle 9f27e53bf1 Remove unnecessary metadata.json 2014-08-25 15:04:21 -07:00
Ben Ogle 720770e2ba Dont dupe classes 2014-08-25 15:04:21 -07:00
Ben Ogle e86b8c1a66 Remove unnecessary things 2014-08-25 15:04:20 -07:00
Ben Ogle 3b9d25ae92 Use donna and tello. Together. 2014-08-25 15:04:20 -07:00
Ben Ogle 9ee6a3d430 Docs task uses metadoc 2014-08-25 15:04:19 -07:00
Ben Ogle 162713e5b5 Sync package.json files for doc imports 2014-08-25 15:04:19 -07:00
Ben Ogle 83659272ac Merge pull request #3132 from atom/bo-remove-oe
Remove old editor
2014-08-25 14:59:30 -07:00
Ben Ogle abadc9805c Add _all_ the defaults in from editorView 2014-08-25 14:46:48 -07:00
Ben Ogle ad269357b7 Ugh. No @mini. @mini is a prop. 2014-08-25 14:34:19 -07:00
Ben Ogle ae323d2083 Use @mini 2014-08-25 12:24:19 -07:00
Ben Ogle cef24a3979 Remove the react editor options 2014-08-25 12:15:34 -07:00
Ben Ogle 7220c61e98 upgrade to find-and-replace to remove old editor stuff 2014-08-25 12:13:41 -07:00
Ben Ogle 6e40f3b2f9 upgrade to bookmarks to remove old editor stuff 2014-08-25 12:11:39 -07:00
Ben Ogle c4811a8fb7 upgrade to git-diff to remove old editor stuff 2014-08-25 12:10:13 -07:00
Kevin Sawicki c7242ec964 Upgrade to language-yaml@0.17 2014-08-25 12:09:39 -07:00
Ben Ogle d37bd14a62 Deprecate getEditor() at a later date… 2014-08-25 12:07:48 -07:00
Ben Ogle 3d2d8c491f rename react-editor-view -> editor-view 2014-08-25 12:07:48 -07:00
Ben Ogle b05a83a6ce move getEditor fn 2014-08-25 12:07:48 -07:00
Ben Ogle 0d68430bb8 Deprecate gutter api 2014-08-25 12:07:48 -07:00
Ben Ogle d75485a2d8 Deprecate no-op’d things 2014-08-25 12:07:48 -07:00
Ben Ogle e54bc0fbaa Remove toggle soft wrap and toggle soft tabs
No one uses them in packages, and we don’t use them internally
2014-08-25 12:07:17 -07:00
Ben Ogle cf9208bc02 Deprecate pageUp / pageDown 2014-08-25 12:07:16 -07:00
Ben Ogle 35fd19f3ef 📝 Add docs for current public methods 2014-08-25 12:07:16 -07:00
Ben Ogle 97bcdcc9b0 Rename ReactEditorView -> EditorView 2014-08-25 12:05:55 -07:00
Ben Ogle fc441ef5e2 📝 fix return doc 2014-08-25 12:05:55 -07:00
Ben Ogle 01c4fe5340 Merge the react and non-react editor styles 2014-08-25 12:05:10 -07:00
Ben Ogle 431fab1a43 Remove the editor-view 2014-08-25 12:05:10 -07:00
Ben Ogle 0e62c98768 Fix the mini-editor test 2014-08-25 12:02:38 -07:00
Ben Ogle f8026bb005 Require the react-editor-view where we require the editor-view 2014-08-25 12:02:38 -07:00
Ben Ogle ef889a50ed Merge pull request #3376 from atom/bo-marker-in-splits
Only emit the marker-created event when the marker exists
2014-08-25 11:55:12 -07:00
Ben Ogle c3c91ae6c3 Only emit the marker-created event when the marker exists
This caused problems in the case of find-and-replace:select-all with 
multiple editors into the same file. 

* a marker is created on the TextBuffer capturing the selection
* DisplayBuffer:create-marker is fired from the first DisplayBuffer. 
The marker is turned into a selection which is merged into the current 
selection, deleting the marker that was created.
* DisplayBuffer::handleBufferMarkerCreated is called on the second
DisplayBuffer. The marker has been destroyed at this point, so it emits 
DisplayBuffer:create-marker with undefined. 
* ERROR>

Closes #3364
2014-08-25 11:42:44 -07:00
Ben Ogle c073d042b8 Merge pull request #3371 from atom/iz-fix-context-menu-again
Dont handle ctrl+click mouse events on OSX
2014-08-25 10:44:11 -07:00
Kevin Sawicki ecf237697b Add react editor view spec for data grammar attrs 2014-08-25 10:22:44 -07:00
Kevin Sawicki 4b8fd222f1 Merge pull request #2996 from thomasjo/editorview-grammarscopes
Add grammar scope to EditorView
2014-08-25 10:14:46 -07:00
Kevin Sawicki 62a1888c6b Upgrade to language-mustache@0.10 2014-08-25 10:06:29 -07:00
Kevin Sawicki 176d73dfcc Upgrade to apm 0.92 2014-08-25 09:58:09 -07:00
Kevin Sawicki c0704edb0d Merge pull request #3355 from atom/ks-open-files-in-current-window
Open file paths in focused window
2014-08-25 09:39:11 -07:00
Kevin Sawicki fb53f85573 Rename topWindow to lastFocusedWindow 2014-08-25 09:21:27 -07:00
Kevin Sawicki 6610447e09 📝 Clarify safeMode description 2014-08-25 09:21:27 -07:00
Kevin Sawicki 9f7560bb89 📝 Doc other atom.open options 2014-08-25 09:21:27 -07:00
Kevin Sawicki a853a27857 Open folder in current untitled window
Untitled windows will now have their project path set when a folder
is opened.
2014-08-25 09:21:27 -07:00
Kevin Sawicki 154fe4006f 📝 Doc file/folder path behavior in usage message 2014-08-25 09:21:27 -07:00
Kevin Sawicki 17feb91876 📝 Move comment above isFile check 2014-08-25 09:21:27 -07:00
Kevin Sawicki 5bdf8a14a7 Use once for closed event 2014-08-25 09:21:27 -07:00
Kevin Sawicki 1196e5a264 📝 Doc dev mode case 2014-08-25 09:21:27 -07:00
Kevin Sawicki a4ae314b00 💄 2014-08-25 09:21:27 -07:00
Kevin Sawicki c9390b61de Track AtomWindow from ipc open event
This ensures the window where the file is dropped is used to open
that file into even when that window does not have focus.
2014-08-25 09:21:27 -07:00
Kevin Sawicki 2811663177 Open file paths in focused window 2014-08-25 09:21:26 -07:00
Thomas Johansen 4dc89f1b1e 🐛 Fix incorrect assertions 2014-08-24 14:14:26 +02:00
Ivan Zuzak b0a9eefa04 Dont handle ctrl+click mouse events on OSX
Ctrl+click on OSX brings up the context menu. In that case, handling the click
event deselects any selection, and that shouldn't happen. See
https://github.com/atom/atom/issues/3308.
2014-08-24 13:33:30 +02:00
Michael Herring aa9728c004 Better autodetection of Soft Tabs.
Check for the presence of a space, instead of the absence of a tab.
This ensures that Soft Tabs will not be activated on a file that (for
example) starts with a BOM or something, but is otherwise full of hard
tabs.
2014-08-24 19:04:46 +09:00
Thomas Johansen dc55d42491 Add test to verify implementation 2014-08-24 10:17:26 +02:00
Thomas Johansen d3b06542a5 Change attribute name to data-grammar 2014-08-24 10:17:25 +02:00
Thomas Johansen 9c154a2f5a Implement support for React Editor 2014-08-24 10:17:25 +02:00
Thomas Johansen 6b1868efd5 Make sure the scope data attribute is always set 2014-08-24 10:17:25 +02:00
Thomas Johansen e50887aab8 Use data attribute instead of CSS classes 2014-08-24 10:17:25 +02:00
Thomas Johansen c6ca03fa49 Add grammar scope to EditorView
Only works when the `grammar-changed` event has been triggered,
and only implemented for Space Pen views.
2014-08-24 10:17:25 +02:00
Ben Ogle a15deaef81 Upgrade to git-diff@0.38.0 to add arrow for deletions. 2014-08-23 10:43:46 -07:00
Kevin Sawicki 461cca2d22 Upgrade to incompatible-packages@0.9 2014-08-22 12:01:41 -07:00
Nathan Sobo d15728321c Merge pull request #3353 from atom/ns-fix-char-width-measurement
Rework DOM measurement to try to prevent measurement errors
2014-08-22 12:07:42 -06:00
Nathan Sobo 9164b0ea3b Don't remeasure char widths until we've performed initial measurement 2014-08-22 11:37:04 -06:00
Nathan Sobo 59a80dcd60 Don't use guard clauses in short measurement methods 2014-08-22 11:36:17 -06:00
Nathan Sobo 72354ebf32 Check for visibility change when mounting instead of polling DOM 2014-08-22 11:35:51 -06:00
Kevin Sawicki a56cea2408 Upgrade to language-ruby-on-rails@0.18 2014-08-22 10:29:05 -07:00
Kevin Sawicki cc28eaf6d2 Upgrade to language-mustache@0.9 2014-08-22 08:56:29 -07:00
Kevin Sawicki 283c76ad3c Upgrade to language-make@0.12 2014-08-22 08:50:53 -07:00
Nathan Sobo a71a524ec7 Rework DOM measurement to try to prevent measurement errors
* Simplify scrollbar refresh and measurement by using imperative DOM
  manipulation instead of React to hide/show scrollbars.
* Rename `::performInitialMeasurement` to `::becameVisible`
* Break `::checkForVisibilityChange` out of `::pollDOM` and use it in
  to check for the element becoming visible in `componentWillUpdate`.
* Don't rely on stored visibility state anywhere. Always check again.
  This could potentially be cached for an update cycle but being wrong
  about this is disastrous so I'm being conservative.
2014-08-21 17:50:46 -06:00
Ben Ogle a2f7ec9d73 Merge pull request #3350 from atom/bo-theme-classes
Add classes to the workspace for themes
2014-08-21 12:01:53 -07:00
Ben Ogle 26d696a93d Add classes to the workspace for themes
Fixes #3097
2014-08-21 11:53:10 -07:00
Ben Ogle 30aa47026d Do not move cursor when interacting with horiz scrollbar
Fix #3284
2014-08-21 10:40:16 -07:00
Kevin Sawicki ec6bfbb9e6 Merge pull request #3349 from aaronshaf/patch-1
Removed unnecessary comma
2014-08-21 10:11:00 -06:00
Aaron Shafovaloff d986ab0293 Removed unnecessary comma 2014-08-21 10:09:32 -06:00
Kevin Sawicki c7f5321d14 Upgrade to language-make@0.11 2014-08-21 09:59:38 -06:00
Kevin Sawicki cb868bab4c Upgrade to language-hyperlink@0.12 2014-08-21 09:57:15 -06:00
Kevin Sawicki 024d7f8d88 Upgrade to language-sass@0.19 2014-08-20 10:13:32 -06:00
Cheng Zhao 1022d8ab4b Upgrade to atom-shell@0.15.9 2014-08-20 19:04:45 +08:00
Kevin Sawicki 760e6c6c29 Upgrade to language-sass@0.18 2014-08-19 16:37:42 -06:00
Nathan Sobo beae15ef7f Update find-and-replace for new config settings 2014-08-19 16:24:14 -06:00
Nathan Sobo 7a0a808af1 Change ctrl-a binding to editor:move-to-first-character-of-line
Considering that the entire Atom core team has ctrl-a bound to move to
the first character and it's also the the default behavior of Sublime,
this seems like a more sensible and useful default option even though
it deviates from text editing norms on OS X.
2014-08-19 12:14:16 -06:00
Nathan Sobo 5cb084d568 Fix editor:move-to-first-character-of-line with leading hard tabs
Fixes #3314
2014-08-19 11:50:04 -06:00
Kevin Sawicki f72daffdbb Upgrade to spell-check@0.42 2014-08-19 11:44:09 -06:00
Kevin Sawicki 4aba8fef7e 📝 Mention Task::start/Task::send throw errors
Refs #3326
2014-08-19 11:39:20 -06:00
Kevin Sawicki 75853e2f9c Upgrade to language-ruby-on-rails@0.17 2014-08-19 10:28:46 -06:00
Kevin Sawicki 3baeb3797f Merge pull request #3289 from abahgat/mkdeb-permissions
🐧 Set file mode to 755 to directories created for mkdeb.
2014-08-19 10:03:15 -06:00
Kevin Sawicki 7d0452f093 Upgrade to language-ruby@0.35 2014-08-19 09:45:50 -06:00
Kevin Sawicki 7edcadb50a Upgrade to language-ruby-on-rails@0.16 2014-08-18 19:11:17 -06:00
Kevin Sawicki fc198b6e17 Upgrade to language-gfm@0.48 2014-08-18 18:57:03 -06:00
Kevin Sawicki 86f8944aaf Remove default Window menu on Windows/Linux
This is really only a thing on Mac OS X

Closes #3307
2014-08-18 09:31:10 -06:00
Kevin Sawicki dda0e7f4ce Upgrade to language-c@0.28 2014-08-18 08:35:07 -06:00
Kevin Sawicki e1ff6ab327 Upgrade to setings-view@0.140 2014-08-18 08:22:29 -06:00
Kevin Sawicki 2b87f4bcb5 Merge pull request #3315 from dmnd/fix-checkout-head
Fix error when running `checkout-head-revision`
2014-08-18 08:07:07 -06:00
Cheng Zhao 3190c0c517 Upgrade to atom-shell@0.15.8 2014-08-18 20:02:15 +08:00
Desmond Brand a1d8ee86f9 Fix error when running checkout-head-revision
I got the following error when running `checkout-head-revision`:

```
Uncaught TypeError: undefined is not a function /Applications/Atom.app/Contents/Resources/app/src/editor-component.js:804
addCommandListeners.editor:checkout-head-revision /Applications/Atom.app/Contents/Resources/app/src/editor-component.js:804
(anonymous function) /Applications/Atom.app/Contents/Resources/app/src/editor-component.js:840
jQuery.event.dispatch /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360
module.exports.KeymapManager.dispatchCommandEvent /Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:400
module.exports.KeymapManager.handleKeyboardEvent /Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:181
module.exports.WindowEventHandler.onKeydown
```

It looks like it was caused by a bad merge conflict resolution in 0eaec57.

Test Plan:

Built new Atom and pressed `cmd-alt-z` and didn't get an error.

Looked at a side-by-side diff to check for any other merge issues:

```
git difftool -t opendiff 32e59ce..32e59ce^ src/editor-component.coffee
```
2014-08-17 17:57:08 -07:00
Kevin Sawicki ebbea64b3d Merge pull request #3295 from dmnd/tighten-lint-rules
Tighten lint rules
2014-08-15 17:18:34 -07:00
Desmond Brand a20f04149c remove line_endings rule 2014-08-15 17:06:43 -07:00
Kevin Sawicki b46e03437c Upgrade to styleguide@0.30 2014-08-15 16:58:24 -07:00
Desmond Brand ccd32cd084 💄 arrow spacing warn -> error 2014-08-15 15:57:50 -07:00
Desmond Brand 6b5d16173b 💄 more lint rules 2014-08-15 15:55:22 -07:00
Kevin Sawicki 237d71417d Upgrade to language-coffee-script@0.30 2014-08-15 15:54:59 -07:00
Desmond Brand 590bfa0c86 💄 Tighten lint rules
coffeelint.json had some rules set to ignore, but since #3116 was merged there
are no violations of these rules in the code anymore. Tighten up the rules to
prevent those kinds of errors from creeping back in.

Test Plan:

Lint executes without finding any errors

```
$ ./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-15 15:34:33 -07:00
Ben Ogle 881c21829b Fix benchmark requires 2014-08-15 14:13:03 -07:00
Ben Ogle 34f96b2ea2 Correctly bootstrap the benchmarks 2014-08-15 14:13:03 -07:00
Ben Ogle c989557b5e Run benchmarks passes specDir 2014-08-15 14:13:03 -07:00
Kevin Sawicki 0a07e862c2 Upgrade to language-html@0.25 2014-08-15 14:02:37 -07:00
Kevin Sawicki 0eaec57f7b Merge pull request #3116 from maschs/ms-srcLint
coffeelint!
2014-08-15 13:52:15 -07:00
Kevin Sawicki 5873a03145 Prepare 0.124 2014-08-15 12:43:52 -07:00
Kevin Sawicki 3ff8f35863 Swap order of ctrl-w and ctrl-f4
This allows `Ctrl-W` to appear in the system menu again until
the atom-shell issue with function keys is fixed.

Refs atom/atom-shell#485
Closes #3283
2014-08-15 12:17:09 -07:00
Nathan Sobo 6c52bcf20c Assign ::firstNonWhitespace/TrailingWhitespaceIndex in Token::split
Fixes #3277
2014-08-15 12:58:27 -06:00
Kevin Sawicki 5975548cec Upgrade to space-pen@3.4.1 2014-08-15 11:56:42 -07:00
Kevin Sawicki 3742dadbb9 Upgrade to language-gfm@0.47 2014-08-15 11:39:28 -07:00
Ben Ogle 919f541685 Merge pull request #3261 from atom/bo-default-react-mini
Default to the react mini editors
2014-08-15 11:16:28 -07:00
Kevin Sawicki 8bebfdb871 Start shipping language-mustache 2014-08-15 11:00:30 -07:00
Alessandro Bahgat cda8382902 🐧 Set file mode to 755 to directories created for mkdeb. 2014-08-15 13:41:42 -04:00
Kevin Sawicki dfbf0de961 Upgrade to language-yaml@0.16 2014-08-15 09:48:38 -07:00
Kevin Sawicki 4a9e397be0 Upgrade to language-less@0.14 2014-08-15 09:00:09 -07:00
Kevin Sawicki e10a578c04 Upgrade to open-on-github@0.30 2014-08-15 08:45:21 -07:00
Nathan Sobo 2bd8456923 Preserve invisibles in editor model across serialization
Fixes #3281
2014-08-15 08:18:53 -06:00
Cheng Zhao c5f0126078 Merge pull request #3286 from atom/atom-shell-v0.15.7
Upgrade to atom-shell@0.15.7
2014-08-15 22:18:49 +08:00
Cheng Zhao 28500e189b Upgrade to atom-shell@0.15.7 2014-08-15 18:55:34 +08:00
Kevin Sawicki a62e90820d Upgrade to autoflow@0.18 2014-08-14 16:45:43 -07:00
Kevin Sawicki 853e8e8f17 Upgrade to status-bar@0.43 2014-08-14 16:27:29 -07:00
Kevin Sawicki 1da47dbbbd Upgrade to grammar-selectoro@0.29 2014-08-14 16:18:52 -07:00
Kevin Sawicki f96ac09c36 Merge pull request #3276 from atom/ks-restore-maximized-state
Restore maximized state of window
2014-08-14 15:55:53 -07:00
Kevin Sawicki d6852cab15 Don't maximize on Mac OS X
Just setting size, position, and full screen state is sufficient since
there is no explicit maximized state.
2014-08-14 15:46:44 -07:00
Kevin Sawicki 75f01f87da Maximize window after it is shown 2014-08-14 15:30:04 -07:00
Kevin Sawicki f901007892 Document darwin check 2014-08-14 14:37:42 -07:00
Kevin Sawicki a7a6236b26 Add maximized parameter 2014-08-14 14:37:15 -07:00
Kevin Sawicki ef47bdab3f Remove unused method 2014-08-14 14:34:14 -07:00
Kevin Sawicki 8cf999f73b Store maximized state in window dimensions 2014-08-14 14:33:02 -07:00
Kevin Sawicki 20b44500d1 Restore maximized state of window
On Linux and Windows there is a maximized state that isn't the
same as simply restoring the window's size on Mac OS X.
2014-08-14 14:22:20 -07:00
Kevin Sawicki e0ebc661f2 Upgrade to language-sass@0.17 2014-08-14 14:14:19 -07:00
Kevin Sawicki d38711e2bf Uprade to atom-keymap@2.0.2 2014-08-14 13:11:51 -07:00
Kevin Sawicki 753f47ef21 Upgrade to pathwatcher@2.0.7 2014-08-14 13:11:08 -07:00
Kevin Sawicki e202ecd1b6 📝 Bool -> Boolean 2014-08-14 13:07:05 -07:00
Kevin Sawicki 02557d36c2 Prepare 0.123 2014-08-14 13:05:19 -07:00
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
Maximilian Schüßler cbe5593381 Do not use "-> return" to mark empty function 2014-08-14 19:42:50 +02:00
Maximilian Schüßler 32e59ce238 Cleanup code according to coffeelint 2014-08-14 19:41:49 +02: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 e725a8ffeb Default to on in the specs 2014-08-13 14:51:05 -07:00
Ben Ogle 23c67c53dc Default the react mini editors to on 2014-08-13 14:43:18 -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
Corey Johnson e179860519 Merge pull request #2571 from lee-dohm/bug-2526
Change line commenting to uncomment if all non-blank lines are commented out
2014-06-12 08:45:47 -07:00
Ivan Žužak 43f8596fb1 Merge pull request #2584 from atom/iz-fix-tab-unindent
Outdent only if a tab is matched at the start of the line
2014-06-12 17:39:23 +02:00
Ben Ogle 2c7d01e398 Merge pull request #2588 from atom/bo-fix-page-up-down
Fix pageUp and pageDown in the react editor
2014-06-11 17:30:59 -07:00
Ben Ogle 1bdf45f7d6 Fix gutter width
When you had a 1000 line file and you fold everything
into 10 lines, it would make the gutter width only large
enough for the 10 lines, so line 999 wouldnt properly
fit in the gutter.

Refs #2423
2014-06-11 17:28:12 -07:00
Ben Ogle 7e6e61905b Move the cursor on pageUp / pageDown
Previously it was only moving the scrollTop, but not the cursors. 
Affected on the react editor.

Refs #2423
2014-06-11 17:19:59 -07:00
Corey Johnson 01b4ff24b9 Dedupe grim 2014-06-11 16:50:45 -07:00
Corey Johnson 47e2cb4645 Update grim and its related modules 2014-06-11 16:50:45 -07:00
Ben Ogle & Nathan Sobo 236f4c5342 Upgrade git-diff to update diff correctly after comitting 2014-06-11 17:40:13 -06:00
Ben Ogle & Nathan Sobo 911390aba8 Upgrade find-and-replace for React fixes 2014-06-11 17:38:01 -06: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
Nathan Sobo 5f602ad86e Merge pull request #2567 from atom/bo-scroll-speed
Slow the scroll speed
2014-06-11 14:44:20 -06:00
Kevin Sawicki 9da9c77e61 Add paths that work on Git 1.7 2014-06-11 13:24:54 -07:00
Kevin Sawicki 8ed05a4201 Only log spec output on failures 2014-06-11 13:24:13 -07:00
Kevin Sawicki a8533c1010 Fail build if any specs fail on Windows 2014-06-11 13:24:13 -07:00
Ben Ogle 87915f70e2 editor.scrollSensitivity option 2014-06-11 12:07:49 -07:00
Ben Ogle ec07cb9524 Slow the scroll speed 2014-06-11 12:07:48 -07:00
Corey Johnson d4ae3ac548 Upgrade to language-c@0.17.0 2014-06-11 12:04:40 -07:00
Nathan Sobo 1b4426e3ba Don't pause overflowchanged events after React editor updates
Fixes #2237

Previously, operations such as typing and scrolling were triggering
overflowchanged events on the editor, which concerned me because we
were performing lots of unnecessary measurements of the scroll view.
Now that we draw extra lines above and below the visible screen row
range, this doesn't happen, so we can remove this pausing code which
was delaying the resizing of the editor in certain situations.
2014-06-11 12:07:05 -06:00
Kevin Sawicki 32245b1d92 Remove humanizeKeystrokes specs
These are already tested thoroughly in underscore-plus and
they are now platform-specific now which this spec was not
expecting.
2014-06-11 10:59:08 -07:00
Nathan Sobo 030bcd6d4f Make react cursor the width of a default character at the end of lines
When the cursor is positioned before a character, we always make it the
width of that character. But at the end of a line, there is no character
to use to set the width, so we just use the defaultCharWidth.

This makes the block cursor visible on empty lines in vim-mode.
2014-06-11 11:54:10 -06:00
Kevin Sawicki f1628fb1e0 Only codesign on Mac OS X 2014-06-11 10:45:12 -07:00
Nathan Sobo 7c1a4a9e08 Don't clip range start/end in DisplayBuffer::pixelRectForScreenRange
Fixes #2583

This prevents the cursor from having 0 width inside atomic tokens.
2014-06-11 11:40:57 -06:00
Kevin Sawicki 3b1c70911f Upgrade to minidump 0.7 2014-06-11 10:30:28 -07:00
Kevin Sawicki 70fc084864 Upgrade to settings-view@0.121 2014-06-11 10:28:25 -07:00
Kevin Sawicki d9152e856b Upgrade to tree-view@0.100 2014-06-11 10:28:25 -07:00
Corey Johnson 10dba4b9a0 Revert "Upgrade find-and-replace@0.116.0"
This reverts commit efea4c6d05.
2014-06-11 10:23:29 -07:00
Corey Johnson 5e51445118 Update cursor z-index 2014-06-11 10:04:31 -07:00
Corey Johnson f4b7f86eb0 Revert "Remove editor-colors class from lines component"
This reverts commit 8cca198af1.
2014-06-11 10:02:16 -07:00
Ivan Zuzak 07308a4e04 Add test for outdenting with tabs after normal characters 2014-06-11 19:02:14 +02:00
Corey Johnson 8cca198af1 Remove editor-colors class from lines component 2014-06-11 09:53:56 -07:00
Ben Ogle efea4c6d05 Upgrade find-and-replace@0.116.0 2014-06-11 09:42:11 -07:00
Ivan Zuzak 588d9b97eb Unindent only if the tab is at the start of the line 2014-06-11 18:31:37 +02:00
Corey Johnson 4f77a371f4 Merge pull request #2497 from atom/cj-add-react-editor-shims
Add shims to the React View Editor
2014-06-11 09:06:40 -07:00
Corey Johnson 94dd1eed54 Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
Conflicts:
	src/editor-component.coffee
2014-06-11 08:56:27 -07:00
Ben Ogle 09b91974a7 Fix casing on Grim import 2014-06-11 08:52:36 -07:00
Nathan Sobo 99611fad34 Give React editor lines and line numbers an opaque background
This ensures subpixel antialiasing works correctly. It was previously
present on both of these components but got dropped accidentally.
2014-06-11 08:51:19 -06:00
Nathan Sobo 1b026cc805 Set is-focused class on React editor's wrapper view for now 2014-06-11 08:37:16 -06:00
Nathan Sobo 4c0d87080a Update git-diff so specs pass with React editor enabled 2014-06-11 08:30:17 -06:00
Nathan Sobo a09eb96982 Upgrade bookmarks to pass specs with react editor enabled 2014-06-11 08:05:30 -06:00
Nathan Sobo 5531d54554 Upgrade autosave to support react editor focusout events 2014-06-11 08:00:04 -06:00
Nathan Sobo b73d267a5f Merge branch 'master' into cj-add-react-editor-shims 2014-06-11 07:34:41 -06:00
Nathan Sobo 5add0e4f70 Don't forceUpdate in setImmediate callback if editor is unmounted
This was throwing errors in the EditorComponent spec.

/cc @benogle, just so you're aware
2014-06-11 07:21:05 -06:00
Nathan Sobo 7040906473 Ignore null bytes when measuring character widths in React editor
Fixes #2391
2014-06-11 07:18:52 -06:00
Nathan Sobo 131aad24c0 Merge branch 'master' into cj-add-react-editor-shims 2014-06-11 06:48:16 -06:00
Nathan Sobo 64870c733b Add API for enabling/disabling input to support vim-mode's insert mode 2014-06-11 06:07:41 -06:00
Nathan Sobo 68ca6a0a0d Merge pull request #2532 from karlin/select-paragraphs
Adds select-to-beginning-of-next/previous-paragraph commands
2014-06-11 05:39:30 -06:00
Kevin Sawicki 376010722e Upgrade to language-javascript@0.27 2014-06-10 18:22:17 -07:00
Kevin Sawicki 31cf907b48 💄 2014-06-10 16:54:25 -07:00
Kevin Sawicki 28af52dfab Upgrade to bracket-matcher@0.45 2014-06-10 15:44:02 -07:00
probablycorey 9e7e77bdf8 Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
Conflicts:
	src/gutter-component.coffee
2014-06-10 15:42:23 -07:00
probablycorey d0385a90ea Revert "Use ReactEditorView in the workspace view spec"
This reverts commit b46ac9080c.
2014-06-10 15:37:49 -07:00
probablycorey f9c4af301d Shim scrollView outlet 2014-06-10 15:19:54 -07:00
Lee Dohm 3cf4b7b3e4 Use imperative style and standard JS regex
Based on pull request feedback
2014-06-10 14:54:01 -07:00
Kevin Sawicki 8523df58b0 Upgrade to image-view@0.35 2014-06-10 14:38:19 -07:00
Kevin Sawicki bd2c2bfe46 Merge pull request #2577 from jugglingnutcase/improve-npm-verify-on-win32
Fix NPM verification failures after `script/clean` on Win32
2014-06-10 14:38:04 -07:00
James R Sconfitto f5a70da6f0 🏁 Use "npm.cmd" to verify npm 2014-06-10 17:26:57 -04:00
probablycorey a8186b15cf Upgrade to bracket-matcher@0.44.0 2014-06-10 13:07:29 -07:00
Kevin Sawicki fe088ba16a Use local npm version when available 2014-06-10 11:45:47 -07:00
Nathan Sobo 562a047b9e Only requestUpdate when scrolling stops if component is still mounted
Fixes #2566
2014-06-10 12:13:57 -06:00
Kevin Sawicki 634c995a71 Verify npm version
This will end up in log output when people report build issues and now
the bootstrap will error when the npm version is <1.4.
2014-06-10 11:05:29 -07:00
Kevin Sawicki 153faefaf9 📝 Link to node.js wiki install instructions
Closes #2340
2014-06-10 09:26:38 -07:00
Kevin Sawicki 636a8a8286 📝 💄 2014-06-10 09:19:39 -07:00
Kevin Sawicki faada2de30 📝 Mention build-essential package
Closes #2384
2014-06-10 09:18:12 -07:00
probablycorey e762efa97e Upgrade to settings-view@0.120.0 2014-06-10 09:00:04 -07:00
Lee Dohm a2c9c21cfb Change line commenting to ignore blanks if any non-blanks
Fixes #2526

This slightly alters the heuristic for deciding whether to uncomment
or to comment blocks of code. Previously, it would key off the first
line of code and only if that was commented would it check the other
lines. Now it checks all lines of code and uncomments the block if all
non-blank lines are commented out.
2014-06-09 21:31:46 -07:00
Lee Dohm ea4f99e5ac Add test to illustrate the problem
See #2526
2014-06-09 21:18:03 -07:00
probablycorey b46ac9080c Use ReactEditorView in the workspace view spec 2014-06-09 17:35:44 -07:00
Kevin Sawicki 24a463b18d Upgrade to find-and-replace@0.115 2014-06-09 17:08:57 -07:00
Kevin Sawicki 3d28a04ffa Upgrade to command-palette@0.22 2014-06-09 16:43:30 -07:00
Ben Ogle 326542644d Upgrade git-diff@0.29.0 bookmarks@0.23.0 2014-06-09 16:33:27 -07:00
Ben Ogle 45f70bb783 Merge pull request #2507 from atom/bo-gutter-api
Add an API for decorations; render stuff in the gutter again
2014-06-09 16:30:48 -07:00
Corey Johnson a227ed7586 Add toggleSoftWrap and toggleSoftTabs 2014-06-09 16:10:29 -07:00
Corey Johnson 5288666bfc Revert "Export ReactEditorView as EditorView"
This reverts commit be20148518.
2014-06-09 16:07:00 -07:00
Corey Johnson 0396aac11f Add several setter shims to ReactEditorView 2014-06-09 16:03:20 -07:00
Ben Ogle 5db163a328 💄 2014-06-09 16:01:29 -07:00
Kevin Sawicki 4d12e025e4 Upgrade to archive-view@0.32 2014-06-09 15:50:26 -07:00
Corey Johnson be20148518 Export ReactEditorView as EditorView 2014-06-09 15:50:08 -07:00
Ben Ogle 756347a716 Add has-selection class to the editor div when there is a selection 2014-06-09 15:45:32 -07:00
Corey Johnson 7379627fcb Add several scroll shims to ReactEditorView 2014-06-09 15:37:02 -07:00
Kevin Sawicki 4b02d3ff61 Upgrade to tree-view@0.99 2014-06-09 15:33:47 -07:00
Ben Ogle dc6836dc2d Add specs for cursor-line decorations 2014-06-09 15:18:12 -07:00
Corey Johnson a2c4caf7ad Move scroll methods below afterAttach method 2014-06-09 15:14:48 -07:00
Corey Johnson e8b6fb919e Add shim for ReactEditorView::redraw 2014-06-09 15:06:49 -07:00
Ben Ogle 2087426afc Specs for decorationsForBufferRow 2014-06-09 15:05:43 -07:00
Kevin Sawicki b703ca0ebf Upgrade to markdown-preview@0.76 2014-06-09 15:04:32 -07:00
Corey Johnson 601c877136 Add pageDown/pageUp to ReactEditorView 2014-06-09 14:46:47 -07:00
Ben Ogle 6c609cb7d2 Revert "Move setImmediate into requestUpdate; Batch updates"
This reverts commit ad522e6ab1.
2014-06-09 14:45:43 -07:00
Corey Johnson 31d7110bba Remove getPageRows from API 2014-06-09 14:42:47 -07:00
Ben Ogle ad522e6ab1 Move setImmediate into requestUpdate; Batch updates 2014-06-09 14:40:59 -07:00
Ben Ogle e59f242f19 Move click gutter into the GutterComponent 2014-06-09 14:11:41 -07:00
Ben Ogle bae625a894 Add spec for when lines become foldable 2014-06-09 14:04:24 -07:00
Ben Ogle b5532ee4a3 💄 spec
Use the event system to click on the gutter
2014-06-09 14:04:24 -07:00
Ben Ogle 31b4b7a372 Speed up decoration removal and use less temp objects. 2014-06-09 14:04:24 -07:00
Ben Ogle 1a1ed56419 Oh man. Render only once! 2014-06-09 14:04:24 -07:00
Ben Ogle 13be8d5139 Add a cursor-line decoration to the gutter 2014-06-09 14:04:24 -07:00
Ben Ogle 312901ff68 Use decorations for folds.
They are more efficient when re-rendering.
2014-06-09 14:04:24 -07:00
Ben Ogle 346b6007ca Allow for typeless decorations that apply to everything
If you are querying for `type: ‘gutter’` it will return the typeless 
decorations as well.
2014-06-09 14:04:24 -07:00
Ben Ogle a8df77243c Fix spec
I changed the width of the gutter in b0af7cfc12729e9ef1320c0b178cc024bc0e60cc
16 characters is still within the break range of the word 'wraps'
2014-06-09 14:04:23 -07:00
Ben Ogle f30641da44 💄 Remove log line. 2014-06-09 14:04:23 -07:00
Ben Ogle 049531e495 Add comment 2014-06-09 14:04:23 -07:00
Ben Ogle e8594ccec4 💄 Change var names for consistency 2014-06-09 14:04:23 -07:00
Ben Ogle 65ab436da2 API docs 2014-06-09 14:04:23 -07:00
Ben Ogle e7bd8026d2 Deprecate old class functions 2014-06-09 14:04:23 -07:00
Ben Ogle d9e731c84a Update styles on the foldable icons 2014-06-09 14:04:23 -07:00
Ben Ogle 8e1e5a3760 Add ability to click the fold icons 2014-06-09 14:04:23 -07:00
Ben Ogle 02594e3f7a 💄 Use for loops 2014-06-09 14:04:23 -07:00
Ben Ogle da5bf6c74c Defensive on the decorations 2014-06-09 14:04:23 -07:00
Ben Ogle 5cd8f5952f Make editor push decorator updates to the gutter 2014-06-09 14:04:23 -07:00
Ben Ogle 1b8be75a76 Add specs for the editor interface
for decorations in ranges and associated with markers
2014-06-09 14:04:23 -07:00
Ben Ogle 235180cf03 Add specs for fold rendering 2014-06-09 14:04:23 -07:00
Ben Ogle a13990155f Use setImmediate rather than setTimeout 2014-06-09 14:04:23 -07:00
Ben Ogle a72f11594d 💄 remove decoratorType instance var 2014-06-09 14:04:23 -07:00
Ben Ogle 86d7a45a78 Remove the comment about overlap
Turns out it’s already dealing with overlap by not emitting events
when there is an overlap.
2014-06-09 14:04:22 -07:00
Ben Ogle a229d696d5 Add addDecorationForBufferRowRange and related remove 2014-06-09 14:04:22 -07:00
Ben Ogle ef6ca3853d 💄 2014-06-09 14:04:22 -07:00
Ben Ogle 9e86d5f5f1 💄 Clean up based on feedback 2014-06-09 14:04:22 -07:00
Ben Ogle 3ef91c61d9 Add api for getStartBufferPosition and related fns 2014-06-09 14:04:22 -07:00
Ben Ogle 5bae58eeb1 Clean up specs based on feedback. 2014-06-09 14:04:22 -07:00
Ben Ogle 6ce859774a Name changes 2014-06-09 14:04:22 -07:00
Ben Ogle fa4a6e2d71 Nof 2014-06-09 14:04:22 -07:00
Ben Ogle 9ee54801a2 Implement removeDecorationsForMarker 2014-06-09 14:04:22 -07:00
Ben Ogle 79578e08ab Specs for marker decorations 2014-06-09 14:04:22 -07:00
Ben Ogle 732e23b8ea Add initial addDecorationForMarker() 2014-06-09 14:04:22 -07:00
Ben Ogle d51894103d Debounce the rendering of decorations 2014-06-09 14:04:22 -07:00
Ben Ogle eb59196c02 Rendering decorations works well.
Also specs.
2014-06-09 14:04:22 -07:00
Ben Ogle 142eedd705 Renders decoration changes. 2014-06-09 14:04:22 -07:00
Ben Ogle 77d269c6d9 Beginning of decorations 2014-06-09 14:04:22 -07:00
Ben Ogle b23009a8f3 fold classes work 2014-06-09 14:04:21 -07:00
Corey Johnson 84de8c1bfd Move benchmark code to the end of the editor component 2014-06-09 14:01:45 -07:00
Kevin Sawicki 6a9faee109 Prepare 0.104 release 2014-06-09 14:01:14 -07:00
Corey Johnson 4d6737230a Remove unused mousewheel event spec 2014-06-09 13:55:19 -07:00
Corey Johnson 362f696e3e Add setFontFamily and setFontSize to ReactEditorView 2014-06-09 13:51:00 -07:00
Corey Johnson 677d3abe0e Add ::getFontFamily 2014-06-09 13:51:00 -07:00
Corey Johnson c78f9137cc Make method style consistent with the rest of the file 2014-06-09 13:51:00 -07:00
Nathan Sobo e9f116a14e Request update when cursors move outside of a batch update 2014-06-09 13:32:42 -06:00
Nathan Sobo b2253ab7ce Add ReactEditorView::insertText shim 2014-06-09 13:32:42 -06:00
Nathan Sobo fc5dc46e73 Make dummy line number have a buffer row of -1
This prevents accidentally returning the dummy line number when asking
for line numbers for buffer row 0 using shim code.
2014-06-09 13:32:42 -06:00
Corey Johnson cb9d488a1e Upgrade to spell-check@0.37.0 2014-06-09 11:20:45 -07:00
Nathan Sobo 8521114c08 Fix failures associated with not passing focused: true on pane splits 2014-06-09 17:09:02 +09:00
Nathan Sobo 43b5a9cfd0 Don't set focused: true on new pane when splitting
This causes the active item to change in the model before the associated
view can be added, which causes problems with the ReactEditorView having
methods called on it before its afterAttach hook creates the component.

We call Pane::activate subsequently unless activation is suppressed,
which will focus the pane anyway, so this was redundant.
2014-06-09 16:48:51 +09:00
Nathan Sobo 4387e16496 Emit selection:changed events if editor is alive after update 2014-06-09 16:13:09 +09:00
Nathan Sobo 6f3ebe8d0c Add ReactEditorView::hiddenInput shim 2014-06-09 15:16:38 +09:00
Nathan Sobo c972d9b022 Get invisibles from component state 2014-06-09 15:11:16 +09:00
Nathan Sobo b1563fdfc0 Destroy item's of last pane even if the pane itself is not destroyed
We always want to preserve at least one pane, so we don't call destroy
on the pane if it is the last pane. However, we still want to destroy
its items. This was previously relying on the view to destroy the
underlying item, which isn't as reliable as doing it in the model.
2014-06-09 15:04:51 +09:00
Nathan Sobo a2c41a2ae3 Don't use the react editor in EditorView specs 2014-06-09 14:52:56 +09:00
Nathan Sobo 21623b9c37 Merge branch 'master' into cj-add-react-editor-shims
Conflicts:
	package.json
2014-06-09 11:56:13 +09:00
Nathan Sobo 2f3d74c047 Merge branch 'master' into cj-add-react-editor-shims
Conflicts:
	src/react-editor-view.coffee
2014-06-06 23:59:54 +09:00
karlin 2f45685a06 remove focused describes 2014-06-06 08:40:15 -04:00
karlin 8577bf9a4c select to beginning of next or previous paragraph commands 2014-06-06 08:37:59 -04:00
Nathan Sobo 2234ff78c7 Include line-number class for backward compatibility 2014-06-06 16:54:28 +09:00
Nathan Sobo fca6a7758b Don't run afterAttach hooks twice on ReactEditorView 2014-06-06 16:46:14 +09:00
Nathan Sobo 7dae04b8d4 Add ReactEditorView::getText 2014-06-06 16:46:14 +09:00
Corey Johnson d7ee81418d Remove editor class form ReactEditorView, it is on EditorComponent
I couldn’t recreate the problem with activation events mentioned
https://github.com/atom/atom/commit/fa66689c07f3c64cdf338da1c9a034d06ec54f9c
2014-06-05 14:13:41 -07:00
Corey Johnson 04e4b917b0 Only show the first 10 lines of a spec failure and its stacktrace
It is difficult to scroll through stack traces when there are huge
failure messages. This limits the length to 10 lines, if you hover 
over the message it will expand.

Somewhat related to #1173
2014-06-05 11:36:26 -07:00
Nathan Sobo 2ee2efeb84 Add ReactEditorView::isFocused shim 2014-06-05 12:07:52 +09:00
Nathan Sobo 367e429162 Add ReactEditorView::setText 2014-06-05 12:03:56 +09:00
Nathan Sobo 8417dfd10e Add the ReactEditorView::updateDisplay shim 2014-06-05 12:01:09 +09:00
Nathan Sobo 15d1c5f992 Add ReactEditorView::setWidthInChars shim 2014-06-05 11:59:02 +09:00
Nathan Sobo e0b1a0cfa7 Add ReactEditorView::getFontSize 2014-06-05 11:58:48 +09:00
Nathan Sobo cfd9baa0d6 Use Editor::getVisibleRowRange instead of the rendered row range
The rendered row range is larger than the visible row range to force the
DOM to break up repaints. This is a more accurate method to us.
2014-06-05 11:54:28 +09:00
probablycorey 1d80c35708 Add active property 2014-06-04 17:33:49 -07:00
probablycorey ad88ace448 Add getFirstVisibleScreenRow and getFirstVisibleScreenRow 2014-06-04 17:18:00 -07:00
probablycorey a6d870bf4c Add underlayer an overlayer classes to the correct elements 2014-06-04 16:32:50 -07:00
Nathan Sobo fa66689c07 Add .editor class to react wrapper for package activation events 2014-06-04 21:07:13 +09:00
Nathan Sobo 905b28975e Add split methods 2014-06-04 21:06:41 +09:00
Nathan Sobo 7e5f667b31 Don't assume ::component is defined 2014-06-04 21:06:27 +09:00
Nathan Sobo f103e72c01 Remove exceptions related to unassigned lineHeight
These exceptions break specs when simulateDomAttachment is used. They
were only present to ensure correct sequencing during development of the
react editor, so it's safe to remove them for now.
2014-06-04 21:05:29 +09:00
Nathan Sobo 6cba6af743 Temporary: Enable react editor for specs on this branch so we get CI feedback 2014-06-04 19:18:54 +09:00
Nathan Sobo eeb44407e3 Add ReactEditorView::getModel 2014-06-04 19:15:56 +09:00
Nathan Sobo 68df603512 Upgrade space-pen to make $.fn.view work with nodes appended w/o jQuery
The autosave package uses $.Event.targetView on a node that's managed
by React. This upgrade to SpacePen allows us to retrieve the containing
SpacePen view.
2014-06-04 19:15:56 +09:00
Corey Johnson 087b52c9b4 Remove unnecessary append method. 2014-06-03 17:13:23 -07:00
Corey Johnson 18f7297968 Use actual property for overlayer 2014-06-03 17:12:56 -07:00
Corey Johnson 3cd34e0b4d Add gutter.getLineNumberElement shim 2014-06-03 15:25:26 -07:00
Corey Johnson 25e3e46166 Make overlayer a property 2014-06-03 14:57:46 -07:00
Corey Johnson 2c84d69ff2 Add overlayer shim 2014-06-03 14:40:30 -07:00
Corey Johnson 3fb28803b5 Add append shim 2014-06-03 14:40:17 -07:00
Andrew Stubbs 1fe6c498ac Make hard tabs align to columns. 2014-05-14 13:31:03 +01:00
224 arquivos alterados com 18812 adições e 14165 exclusões
+6
Ver Arquivo
@@ -6,3 +6,9 @@ spec/fixtures/**/*.less text eol=lf
spec/fixtures/**/*.css text eol=lf
spec/fixtures/**/*.txt text eol=lf
spec/fixtures/dir/**/* text eol=lf
# Git 1.7 does not support **/* patterns
spec/fixtures/css.css text eol=lf
spec/fixtures/sample.js text eol=lf
spec/fixtures/sample.less text eol=lf
spec/fixtures/sample.txt text eol=lf
+1
Ver Arquivo
@@ -0,0 +1 @@
v0.10.21
+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.
+27
Ver Arquivo
@@ -6,10 +6,36 @@ 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.
### Debian Linux (Ubuntu)
Currently only a 64-bit version is available.
1. Download `atom-amd64.deb` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo dpkg --install atom-amd64.deb` on the downloaded package.
3. Launch Atom using the installed `atom` command.
The Linux version does not currently automatically update so you will need to
repeat these steps to upgrade to future releases.
## Building
* [Linux](docs/build-instructions/linux.md)
@@ -18,4 +44,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).
+2 -2
Ver Arquivo
@@ -1,11 +1,11 @@
{
"name": "atom-bundled-apm",
"description": "Atom's bundled APM",
"description": "Atom's bundled apm",
"repository": {
"type": "git",
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "0.68.0"
"atom-package-manager": "0.97.0"
}
}
+8 -3
Ver Arquivo
@@ -50,7 +50,7 @@ if [ $OS == 'Mac' ]; then
# If ATOM_PATH isn't a executable file, use spotlight to search for Atom
if [ ! -x "$ATOM_PATH/$ATOM_APP_NAME" ]; then
ATOM_PATH=$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | head -1 | xargs dirname)
ATOM_PATH=$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | head -1 | xargs dirname)
fi
# Exit if Atom can't be found
@@ -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
) &
+2 -3
Ver Arquivo
@@ -1,6 +1,6 @@
require '../src/window'
Atom = require '../src/atom'
atom = new Atom()
window.atom = Atom.loadOrCreate('spec')
atom.show() unless atom.getLoadSettings().exitWhenDone
window.atom = atom
@@ -9,5 +9,4 @@ window.atom = atom
atom.openDevTools()
document.title = "Benchmark Suite"
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)
runSpecSuite('../benchmark/benchmark-suite', atom.getLoadSettings().logFile)
+4 -2
Ver Arquivo
@@ -1,7 +1,9 @@
require '../spec/spec-helper'
path = require 'path'
{$, _, Point, fs} = require 'atom'
{$, Point} = require 'atom'
_ = require 'underscore-plus'
fs = require 'fs-plus'
Project = require '../src/project'
TokenizedBuffer = require '../src/tokenized-buffer'
@@ -101,7 +103,7 @@ $.fn.resultOfTrigger = (type) ->
event.result
$.fn.enableKeymap = ->
@on 'keydown', (e) => window.keymap.handleKeyEvent(e)
@on 'keydown', (e) -> window.keymap.handleKeyEvent(e)
$.fn.attachToDom = ->
$('#jasmine-content').append(this)
+10 -10
Ver Arquivo
@@ -7,7 +7,7 @@ describe "editorView.", ->
beforeEach ->
atom.workspaceViewParentSelector = '#jasmine-content'
atom.workspaceView = new WorkspaceView
atom.workspaceView = atom.workspace.getView(atom.workspace).__spacePenView
atom.workspaceView.attachToDom()
atom.workspaceView.width(1024)
@@ -53,7 +53,7 @@ describe "editorView.", ->
describe "at-end.", ->
beforeEach ->
editorView.moveCursorToBottom()
editorView.moveToBottom()
benchmark "insert-delete", ->
editorView.insertText('"')
@@ -62,8 +62,8 @@ describe "editorView.", ->
describe "empty-vs-set-innerHTML.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editorView.getFirstVisibleScreenRow()
lastRow = editorView.getLastVisibleScreenRow()
firstRow = editorView.getModel().getFirstVisibleScreenRow()
lastRow = editorView.getModel().getLastVisibleScreenRow()
benchmark "build-gutter-html.", 1000, ->
editorView.gutter.renderLineNumbers(null, firstRow, lastRow)
@@ -97,13 +97,13 @@ describe "editorView.", ->
describe "multiple-lines.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editorView.getFirstVisibleScreenRow()
lastRow = editorView.getLastVisibleScreenRow()
firstRow = editorView.getModel().getFirstVisibleScreenRow()
lastRow = editorView.getModel().getLastVisibleScreenRow()
benchmark "cache-entire-visible-area", 100, ->
for i in [firstRow..lastRow]
line = editorView.lineElementForScreenRow(i)[0]
editorView.positionLeftForLineAndColumn(line, i, Math.max(0, editorView.lineLengthForBufferRow(i)))
editorView.positionLeftForLineAndColumn(line, i, Math.max(0, editorView.getModel().lineTextForBufferRow(i).length))
describe "text-rendering.", ->
beforeEach ->
@@ -178,7 +178,7 @@ describe "editorView.", ->
atom.workspaceView.openSync('huge.js')
benchmark "moving-to-eof.", 1, ->
editorView.moveCursorToBottom()
editorView.moveToBottom()
describe "on-first-line.", ->
benchmark "inserting-newline", 5, ->
@@ -195,11 +195,11 @@ describe "editorView.", ->
endPosition = null
beforeEach ->
editorView.moveCursorToBottom()
editorView.moveToBottom()
endPosition = editorView.getCursorScreenPosition()
benchmark "move-to-beginning-of-word", ->
editorView.moveCursorToBeginningOfWord()
editorView.moveToBeginningOfWord()
editorView.setCursorScreenPosition(endPosition)
benchmark "insert", ->
+56
Ver Arquivo
@@ -0,0 +1,56 @@
#!/usr/bin/env coffee
{spawn, exec} = require 'child_process'
fs = require 'fs'
os = require 'os'
path = require 'path'
_ = require 'underscore-plus'
temp = require 'temp'
directoryToOpen = temp.mkdirSync('browser-process-startup-')
socketPath = path.join(os.tmpdir(), 'atom.sock')
numberOfRuns = 10
deleteSocketFile = ->
try
fs.unlinkSync(socketPath) if fs.existsSync(socketPath)
catch error
console.error(error)
launchAtom = (callback) ->
deleteSocketFile()
cmd = 'atom'
args = ['--safe', '--new-window', '--foreground', directoryToOpen]
atomProcess = spawn(cmd, args)
output = ''
startupTimes = []
dataListener = (data) ->
output += data
if match = /App load time: (\d+)/.exec(output)
startupTime = parseInt(match[1])
atomProcess.stderr.removeListener 'data', dataListener
atomProcess.kill()
exec 'pkill -9 Atom', (error) ->
console.error(error) if error?
callback(startupTime)
atomProcess.stderr.on 'data', dataListener
startupTimes = []
collector = (startupTime) ->
startupTimes.push(startupTime)
if startupTimes.length < numberOfRuns
launchAtom(collector)
else
maxTime = _.max(startupTimes)
minTime = _.min(startupTimes)
totalTime = startupTimes.reduce (previousValue=0, currentValue) -> previousValue + currentValue
console.log "Startup Runs: #{startupTimes.length}"
console.log "First run time: #{startupTimes[0]}ms"
console.log "Max time: #{maxTime}ms"
console.log "Min time: #{minTime}ms"
console.log "Average time: #{Math.round(totalTime/startupTimes.length)}ms"
launchAtom(collector)
+29 -12
Ver Arquivo
@@ -39,21 +39,31 @@ 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')
buildDir = path.resolve(buildDir)
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'
installDir = path.resolve(installDir)
coffeeConfig =
glob_to_multiple:
@@ -89,6 +99,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 +133,8 @@ module.exports = (grunt) ->
atom: {appDir, appName, symbolsDir, buildDir, contentsDir, installDir, shellAppDir}
docsOutputDir: 'docs/output'
coffee: coffeeConfig
less: lessConfig
@@ -133,12 +147,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 +219,7 @@ module.exports = (grunt) ->
shell:
'kill-atom':
command: 'pkill -9 Atom'
command: killCommand
options:
stdout: false
stderr: false
@@ -219,9 +228,17 @@ module.exports = (grunt) ->
grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson', 'peg'])
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
grunt.registerTask('ci', ['output-disk-space', 'download-atom-shell', 'build', 'dump-symbols', 'set-version', 'check-licenses', 'lint', 'test', 'codesign', 'publish-build'])
grunt.registerTask('docs', ['markdown:guides', 'build-docs'])
ciTasks = ['output-disk-space', 'download-atom-shell', 'build']
ciTasks.push('dump-symbols') if process.platform isnt 'win32'
ciTasks.push('set-version', 'check-licenses', 'lint')
ciTasks.push('mkdeb') if process.platform is 'linux'
ciTasks.push('test') if process.platform is 'darwin'
ciTasks.push('codesign')
ciTasks.push('publish-build')
grunt.registerTask('ci', ciTasks)
defaultTasks = ['download-atom-shell', 'build', 'set-version']
defaultTasks.push 'install' unless process.platform is 'linux'
grunt.registerTask('default', defaultTasks)
+11 -9
Ver Arquivo
@@ -7,17 +7,17 @@
},
"dependencies": {
"async": "~0.2.9",
"biscotto": ">=2.1.1 <3.0",
"donna": "1.0.1",
"formidable": "~1.0.14",
"fs-plus": "2.x",
"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",
@@ -26,16 +26,18 @@
"harmony-collections": "~0.3.8",
"json-front-matter": "~0.1.3",
"legal-eagle": "~0.4.0",
"minidump": "~0.6",
"read-package-json": "1.1.8",
"minidump": "~0.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",
"tello": "1.0.3",
"temp": "~0.8.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'
+25 -4
Ver Arquivo
@@ -1,10 +1,13 @@
path = require 'path'
fs = require 'fs-plus'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'codesign', 'Codesign the app', ->
done = @async()
if process.env.XCODE_KEYCHAIN
if process.platform is 'darwin' and process.env.XCODE_KEYCHAIN
unlockKeychain (error) ->
if error?
done(error)
@@ -20,6 +23,24 @@ 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 = ['--deep', '--force', '--verbose', '--sign', '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) ->
return callback(error) if error?
setupExePath = path.join(grunt.config.get('atom.shellAppDir'), '..', 'Releases', 'setup.exe')
if fs.isFileSync(setupExePath)
args = [setupExePath]
spawn {cmd, args}, (error) -> callback(error)
else
callback()
else
callback()
+41
Ver Arquivo
@@ -0,0 +1,41 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{spawn, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'create-installer', 'Create the Windows installer', ->
return unless process.platform is 'win32'
done = @async()
buildDir = grunt.config.get('atom.buildDir')
atomDir = path.join(buildDir, 'Atom')
packageInfo = grunt.file.readJSON(path.join(atomDir, 'resources', 'app', 'package.json'))
inputTemplate = grunt.file.read(path.join('build', 'windows', 'atom.nuspec.erb'))
# NB: Build server has some sort of stamp on the version number
packageInfo.version = packageInfo.version.replace(/-.*$/, '')
targetNuspecPath = path.join(buildDir, 'atom.nuspec')
grunt.file.write(targetNuspecPath, _.template(inputTemplate, packageInfo))
cmd = 'build/windows/nuget.exe'
args = ['pack', targetNuspecPath, '-BasePath', atomDir, '-OutputDirectory', buildDir]
spawn {cmd, args}, (error, result, code) ->
return done(error) if error?
pkgs = pkg for pkg in fs.readdirSync(buildDir) when path.extname(pkg) is '.nupkg'
releasesDir = path.join(buildDir, 'Releases')
# NB: Gonna clear Releases for now, in the future we need to pull down
# the existing version
rm(releasesDir)
cmd = 'build/windows/update.com'
args = ['--releasify', path.join(buildDir, pkgs), '-r', releasesDir, '-g', 'build/windows/install-spinner.gif']
spawn {cmd, args}, (error, result, code) -> done(error)
+30 -150
Ver Arquivo
@@ -1,160 +1,40 @@
path = require 'path'
async = require 'async'
fs = require 'fs-plus'
request = require 'request'
_ = require 'underscore-plus'
donna = require 'donna'
tello = require 'tello'
module.exports = (grunt) ->
{rm} = require('./task-helpers')(grunt)
getClassesToInclude = ->
modulesPath = path.resolve(__dirname, '..', '..', 'node_modules')
classes = {}
fs.traverseTreeSync modulesPath, (modulePath) ->
return false if modulePath.match(/node_modules/g).length > 1 # dont need the dependencies of the dependencies
return true unless path.basename(modulePath) is 'package.json'
return true unless fs.isFileSync(modulePath)
cmd = path.join('node_modules', '.bin', 'coffee')
commonArgs = [path.join('build', 'node_modules', '.bin', 'biscotto'), '--']
opts =
stdio: 'inherit'
apiPath = path.join(path.dirname(modulePath), 'api.json')
if fs.isFileSync(apiPath)
_.extend(classes, grunt.file.readJSON(apiPath).classes)
true
classes
sortClasses = (classes) ->
sortedClasses = {}
for className in Object.keys(classes).sort()
sortedClasses[className] = classes[className]
sortedClasses
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')
args = [
commonArgs...
'--title', 'Atom API Documentation'
'-o', 'docs/output/api'
'-r', 'docs/README.md'
'--stability', '1'
'src/'
includePaths...
]
grunt.util.spawn({cmd, args, opts}, done)
metadata = donna.generateMetadata(['.'])
api = tello.digest(metadata)
_.extend(api.classes, getClassesToInclude())
api.classes = sortClasses(api.classes)
grunt.registerTask 'lint-docs', 'Generate stats about the doc coverage', ->
done = @async()
downloadIncludes (error, includePaths) ->
if error?
done(error)
else
args = [
commonArgs...
'--noOutput'
'src/'
includePaths...
]
grunt.util.spawn({cmd, args, opts}, done)
grunt.registerTask 'missing-docs', 'Generate stats about the doc coverage', ->
done = @async()
downloadIncludes (error, includePaths) ->
if error?
done(error)
else
args = [
commonArgs...
'--noOutput'
'--missing'
'src/'
includePaths...
]
grunt.util.spawn({cmd, args, opts}, done)
grunt.registerTask 'copy-docs', 'Copies over latest API docs to atom-docs', ->
done = @async()
fetchTag = (args..., callback) ->
cmd = 'git'
args = ['describe', '--abbrev=0', '--tags']
grunt.util.spawn {cmd, args}, (error, result) ->
if error?
callback(error)
else
callback(null, String(result).trim())
copyDocs = (tag, callback) ->
cmd = 'cp'
args = ['-r', 'docs/output/', "../atom.io/public/docs/api/#{tag}/"]
fs.exists "../atom.io/public/docs/api/", (exists) ->
if exists
grunt.util.spawn {cmd, args}, (error, result) ->
if error?
callback(error)
else
callback(null, tag)
else
grunt.log.error "../atom.io/public/docs/api/ doesn't exist"
return false
grunt.util.async.waterfall [fetchTag, copyDocs], done
grunt.registerTask 'deploy-docs', 'Publishes latest API docs to atom-docs.githubapp.com', ->
done = @async()
docsRepoArgs = ['--work-tree=../atom-docs/', '--git-dir=../atom-docs/.git/']
fetchTag = (args..., callback) ->
cmd = 'git'
args = ['describe', '--abbrev=0', '--tags']
grunt.util.spawn {cmd, args}, (error, result) ->
if error?
callback(error)
else
callback(null, String(result).trim().split('.')[0..1].join('.'))
stageDocs = (tag, callback) ->
cmd = 'git'
args = [docsRepoArgs..., 'add', "public/#{tag}"]
grunt.util.spawn({cmd, args, opts}, callback)
fetchSha = (args..., callback) ->
cmd = 'git'
args = ['rev-parse', 'HEAD']
grunt.util.spawn {cmd, args}, (error, result) ->
if error?
callback(error)
else
callback(null, String(result).trim())
commitChanges = (sha, callback) ->
cmd = 'git'
args = [docsRepoArgs..., 'commit', "-m Update API docs to #{sha}"]
grunt.util.spawn({cmd, args, opts}, callback)
pushOrigin = (args..., callback) ->
cmd = 'git'
args = [docsRepoArgs..., 'push', 'origin', 'master']
grunt.util.spawn({cmd, args, opts}, callback)
pushHeroku = (args..., callback) ->
cmd = 'git'
args = [docsRepoArgs..., 'push', 'heroku', 'master']
grunt.util.spawn({cmd, args, opts}, callback)
grunt.util.async.waterfall [fetchTag, stageDocs, fetchSha, commitChanges, pushOrigin, pushHeroku], done
downloadFileFromRepo = ({repo, file}, callback) ->
uri = "https://raw.github.com/atom/#{repo}/master/#{file}"
request uri, (error, response, contents) ->
return callback(error) if error?
downloadPath = path.join('docs', 'includes', repo, file)
fs.writeFile downloadPath, contents, (error) ->
callback(error, downloadPath)
downloadIncludes = (callback) ->
includes = [
{repo: 'atom-keymap', file: 'src/keymap-manager.coffee'}
{repo: 'atom-keymap', file: 'src/key-binding.coffee'}
{repo: 'first-mate', file: 'src/grammar.coffee'}
{repo: 'first-mate', file: 'src/grammar-registry.coffee'}
{repo: 'node-pathwatcher', file: 'src/directory.coffee'}
{repo: 'node-pathwatcher', file: 'src/file.coffee'}
{repo: 'space-pen', file: 'src/space-pen.coffee'}
{repo: 'text-buffer', file: 'src/marker.coffee'}
{repo: 'text-buffer', file: 'src/point.coffee'}
{repo: 'text-buffer', file: 'src/range.coffee'}
{repo: 'text-buffer', file: 'src/text-buffer.coffee'}
{repo: 'theorist', file: 'src/model.coffee'}
]
async.map(includes, downloadFileFromRepo, callback)
apiJson = JSON.stringify(api, null, 2)
apiJsonPath = path.join(docsOutputDir, 'api.json')
grunt.file.write(apiJsonPath, apiJson)
+24 -1
Ver Arquivo
@@ -1,7 +1,9 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
fs = require 'fs-plus'
runas = null
temp = require 'temp'
module.exports = (grunt) ->
{cp, mkdir, rm} = require('./task-helpers')(grunt)
@@ -9,6 +11,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'
@@ -20,17 +23,37 @@ module.exports = (grunt) ->
else if process.platform is 'darwin'
rm installDir
mkdir path.dirname(installDir)
cp shellAppDir, installDir
tempFolder = temp.path()
mkdir tempFolder
cp shellAppDir, tempFolder
fs.renameSync(tempFolder, installDir)
else
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')
+31 -16
Ver Arquivo
@@ -2,16 +2,27 @@ 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
getInstalledSize = (buildDir, callback) ->
cmd = 'du'
args = ['-sk', path.join(buildDir, 'Atom')]
spawn {cmd, args}, (error, {stdout}) ->
installedSize = stdout.split(/\s+/)?[0] or '200000' # default to 200MB
callback(null, installedSize)
grunt.registerTask 'mkdeb', 'Create debian package', ->
done = @async()
buildDir = grunt.config.get('atom.buildDir')
if process.arch is 'ia32'
arch = 'i386'
@@ -23,15 +34,19 @@ 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'
getInstalledSize buildDir, (error, installedSize) ->
data = {name, version, description, section, arch, maintainer, installDir, iconName, installedSize}
controlFilePath = fillTemplate(path.join('resources', 'linux', 'debian', 'control'), data)
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'Atom.desktop'), data)
icon = path.join('resources', 'atom.png')
control = path.join('resources', 'linux', 'debian', 'control')
fillTemplate(control, data)
desktop = path.join('resources', 'linux', 'Atom.desktop')
fillTemplate(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]
spawn({cmd, args}, done)
cmd = path.join('script', 'mkdeb')
args = [version, arch, controlFilePath, desktopFilePath, icon, buildDir]
spawn {cmd, args}, (error) ->
if error?
done(error)
else
grunt.log.ok "Created #{buildDir}/atom-#{version}-#{arch}.deb"
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')
+53 -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 =
@@ -21,15 +17,25 @@ defaultHeaders =
module.exports = (gruntObject) ->
grunt = gruntObject
{cp} = require('./task-helpers')(grunt)
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 api.json to atom-api.json', ->
docsOutputDir = grunt.config.get('docsOutputDir')
buildDir = grunt.config.get('atom.buildDir')
cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json')
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 +44,55 @@ module.exports = (gruntObject) ->
return done(error) if error?
uploadAssets(release, buildDir, assets, done)
getAssets = ->
switch process.platform
when 'darwin'
[
{assetName: 'atom-mac.zip', sourcePath: 'Atom.app'}
{assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'}
{assetName: 'atom-api.json', sourcePath: 'atom-api.json'}
]
when 'win32'
[
{assetName: 'atom-windows.zip', sourcePath: 'Atom'}
]
when 'linux'
buildDir = grunt.config.get('atom.buildDir')
if process.arch is 'ia32'
arch = 'i386'
else
arch = 'amd64'
{version} = grunt.file.readJSON('package.json')
sourcePath = "#{buildDir}/atom-#{version}-#{arch}.deb"
assetName = "atom-#{arch}.deb"
{cp} = require('./task-helpers')(grunt)
cp sourcePath, path.join(buildDir, assetName)
[
{assetName, sourcePath}
]
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 when path.extname(assetName) is '.zip'
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 +157,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
+25 -23
Ver Arquivo
@@ -2,7 +2,6 @@ fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
async = require 'async'
module.exports = (grunt) ->
@@ -10,18 +9,27 @@ module.exports = (grunt) ->
packageSpecQueue = null
getAppPath = ->
contentsDir = grunt.config.get('atom.contentsDir')
switch process.platform
when 'darwin'
path.join(contentsDir, 'MacOS', 'Atom')
when 'linux'
path.join(contentsDir, 'atom')
when 'win32'
path.join(contentsDir, 'atom.exe')
runPackageSpecs = (callback) ->
failedPackages = []
rootDir = grunt.config.get('atom.shellAppDir')
contentsDir = grunt.config.get('atom.contentsDir')
resourcePath = process.cwd()
if process.platform is 'darwin'
appPath = path.join(contentsDir, 'MacOS', 'Atom')
else if process.platform is 'win32'
appPath = path.join(contentsDir, 'atom.exe')
appPath = getAppPath()
# Ensure application is executable on Linux
fs.chmodSync(appPath, '755') if process.platform is 'linux'
packageSpecQueue = async.queue (packagePath, callback) ->
if process.platform is 'darwin'
if process.platform in ['darwin', 'linux']
options =
cmd: appPath
args: ['--test', "--resource-path=#{resourcePath}", "--spec-directory=#{path.join(packagePath, 'spec')}"]
@@ -39,7 +47,8 @@ module.exports = (grunt) ->
grunt.verbose.writeln "Launching #{path.basename(packagePath)} specs."
spawn options, (error, results, code) ->
if process.platform is 'win32'
process.stderr.write(fs.readFileSync(path.join(packagePath, 'ci.log')))
if error
process.stderr.write(fs.readFileSync(path.join(packagePath, 'ci.log')))
fs.unlinkSync(path.join(packagePath, 'ci.log'))
failedPackages.push path.basename(packagePath) if error
@@ -52,21 +61,15 @@ 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) ->
contentsDir = grunt.config.get('atom.contentsDir')
if process.platform is 'darwin'
appPath = path.join(contentsDir, 'MacOS', 'Atom')
else if process.platform is 'win32'
appPath = path.join(contentsDir, 'atom.exe')
appPath = getAppPath()
resourcePath = process.cwd()
coreSpecsPath = path.resolve('spec')
if process.platform is 'darwin'
if process.platform in ['darwin', 'linux']
options =
cmd: appPath
args: ['--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}"]
@@ -77,7 +80,7 @@ module.exports = (grunt) ->
spawn options, (error, results, code) ->
if process.platform is 'win32'
process.stderr.write(fs.readFileSync('ci.log'))
process.stderr.write(fs.readFileSync('ci.log')) if error
fs.unlinkSync('ci.log')
else
# TODO: Restore concurrency on Windows
@@ -91,7 +94,7 @@ module.exports = (grunt) ->
# TODO: This should really be parallel on both platforms, however our
# fixtures step on each others toes currently.
if process.platform is 'darwin'
if process.platform in ['darwin', 'linux']
method = async.parallel
else if process.platform is 'win32'
method = async.series
@@ -105,8 +108,7 @@ module.exports = (grunt) ->
grunt.log.error("[Error]".red + " #{failures.join(', ')} spec(s) failed") if failures.length > 0
# TODO: Mark the build as green on Windows until specs pass.
if process.platform is 'darwin'
if process.platform is 'win32' and process.env.JANKY_SHA1
done()
else
done(!coreSpecFailed and failedPackages.length == 0)
else if process.platform is 'win32'
done(true)
+3 -2
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()
@@ -53,8 +53,9 @@ module.exports = (grunt) ->
proc = childProcess.spawn(options.cmd, options.args, options.opts)
proc.stdout.on 'data', (data) -> stdout.push(data.toString())
proc.stderr.on 'data', (data) -> stderr.push(data.toString())
proc.on 'error', (processError) -> error ?= processError
proc.on 'close', (exitCode, signal) ->
error = new Error(signal) if exitCode != 0
error ?= new Error(signal) if exitCode != 0
results = {stderr: stderr.join(''), stdout: stdout.join(''), code: exitCode}
grunt.log.error results.stderr if exitCode != 0
callback(error, results, exitCode)
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+32
Ver Arquivo
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id><%= name %></id>
<version><%= version %></version>
<authors>The Atom Community</authors>
<owners>The Atom Community</owners>
<iconUrl>https://raw.githubusercontent.com/atom/atom/master/resources/win/atom.ico</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description><%= description %></description>
</metadata>
<files>
<file src="locales\**" target="lib\net45\locales" />
<file src="resources\**" target="lib\net45\resources" />
<file src="*.pak" target="lib\net45" />
<file src="atom.exe" target="lib\net45\atom.exe" />
<file src="atom.exe.gui" target="lib\net45\atom.exe.gui" />
<file src="chromiumcontent.dll" target="lib\net45\chromiumcontent.dll" />
<file src="d3dcompiler_43.dll" target="lib\net45\d3dcompiler_43.dll" />
<file src="ffmpegsumo.dll" target="lib\net45\ffmpegsumo.dll" />
<file src="icudtl.dat" target="lib\net45\icudtl.dat" />
<file src="libEGL.dll" target="lib\net45\libEGL.dll" />
<file src="libGLESv2.dll" target="lib\net45\libGLESv2.dll" />
<file src="LICENSE" target="lib\net45\LICENSE" />
<file src="msvcp120.dll" target="lib\net45\msvcp120.dll" />
<file src="msvcr120.dll" target="lib\net45\msvcr120.dll" />
<file src="vccorlib120.dll" target="lib\net45\vccorlib120.dll" />
<file src="version" target="lib\net45\version" />
<file src="xinput1_3.dll" target="lib\net45\xinput1_3.dll" />
</files>
</package>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 43 KiB

+17
Ver Arquivo
@@ -0,0 +1,17 @@
{
"max_line_length": {
"level": "ignore"
},
"no_empty_param_list": {
"level": "error"
},
"arrow_spacing": {
"level": "error"
},
"no_interpolation_in_single_quotes": {
"level": "error"
},
"no_debugger": {
"level": "error"
}
}
+12 -31
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
@@ -58,15 +48,6 @@ but you can programmatically write to it with `atom.config.set`:
atom.config.set("core.showInvisibles", true)
```
You should never mutate the value of a config key, because that would circumvent
the notification of observers. You can however use methods like `pushAtKeyPath`,
`unshiftAtKeyPath`, and `removeAtKeyPath` to manipulate mutable config values.
```coffeescript
atom.config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
atom.config.removeAtKeyPath("core.disabledPackages", "terminal")
```
You can also use `setDefaults`, which will assign default values for keys that
are always overridden by values assigned with `set`. Defaults are not written
out to the the `config.json` file to prevent it from becoming cluttered.
+1 -1
Ver Arquivo
@@ -56,7 +56,7 @@ character of the current line:
class EditorView
listenForEvents: ->
@command 'editor:move-to-first-character-of-line', =>
@editor.moveCursorToFirstCharacterOfLine()
@editor.moveToFirstCharacterOfLine()
```
The `::command` method is basically an enhanced version of jQuery's `::on`
+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"
}
+88 -15
Ver Arquivo
@@ -5,29 +5,85 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
## Requirements
* OS with 64-bit or 32-bit architecture
* [node.js](http://nodejs.org/download/) v0.10.x
* [npm](http://www.npmjs.org/) v1.4.x
* 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).
* C++ toolchain
* [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
If you have problems with permissions don't forget to prefix with `sudo`
1. Clone the Atom repository:
```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
```
## Troubleshooting
2. Checkout the latest Atom release:
```sh
git fetch
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
```
3. Build Atom:
```sh
script/build
```
This will create the atom application at `$TMPDIR/atom-build/Atom`.
4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing:
```sh
sudo script/grunt install
```
5. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`:
```sh
script/grunt mkdeb
```
Use the newly installed Atom by fully quitting Atom and then reopening.
## 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"
@@ -47,10 +103,27 @@ this is the reason for this error you can issue
and restart Atom. If Atom now works fine, you can make this setting permanent:
```sh
echo 32768 > /proc/sys/fs/inotify/max_user_watches
echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
```
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.
#### You can also use Alternatives
On some variants (mostly Debian based distros) it's preferable for you to use
Alternatives so that changes to the binary paths can be fixed or altered easily:
```sh
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 1 --slave /usr/bin/js js /usr/bin/nodejs
```
### 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.
* 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.
+27 -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'
```
@@ -320,6 +321,29 @@ extensions your grammar supports:
]
```
## Adding Configuration Settings
You can support config settings in your package that are editable in the
settings view. Specify a `config` key in your package main:
```coffeescript
module.exports =
# Your config schema!
config:
someInt:
type: 'integer'
default: 23
minimum: 1
activate: (state) -> # ...
# ...
```
To define the configuration, we use [json schema][json-schema] which allows you
to indicate the type your value should be, its default, etc.
See the [Config API Docs](https://atom.io/docs/api/latest/Config) for more
details specifying your configuration.
## Bundle External Resources
It's common to ship external resources like images and fonts in the package, to
@@ -391,3 +415,4 @@ all the other available commands.
[first-package]: your-first-package.html
[convert-bundle]: converting-a-text-mate-bundle.html
[convert-theme]: converting-a-text-mate-theme.html
[json-schema]: http://json-schema.org/
+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.
+3 -3
Ver Arquivo
@@ -53,7 +53,7 @@ module.exports =
convert: ->
# This assumes the active pane item is an editor
editor = atom.workspace.activePaneItem
editor = atom.workspace.getActivePaneItem()
editor.insertText('Hello, World!')
```
@@ -131,8 +131,8 @@ inserting 'Hello, World!' convert the selected text to ASCII art.
```coffeescript
convert: ->
# This assumes the active pane item is an editor
editor = atom.workspace.activePaneItem
selection = editor.getSelection()
editor = atom.workspace.getActivePaneItem()
selection = editor.getLastSelection()
figlet = require 'figlet'
figlet selection.getText(), {font: "Larry 3D 2"}, (error, asciiArt) ->
+1 -1
Ver Arquivo
@@ -11,4 +11,4 @@
# atom.workspaceView.eachEditorView (editorView) ->
# editor = editorView.getEditor()
# if path.extname(editor.getPath()) is '.md'
# editor.setSoftWrap(true)
# editor.setSoftWrapped(true)
+4 -1
Ver Arquivo
@@ -13,6 +13,9 @@
# 'enter': 'editor:newline'
#
# '.workspace':
# 'ctrl-P': 'core:move-up'
# 'ctrl-shift-p': 'core:move-up'
# 'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * https://atom.io/docs/latest/customizing-atom#customizing-key-bindings
# * https://atom.io/docs/latest/advanced/keymaps
+13 -2
Ver Arquivo
@@ -1,9 +1,10 @@
{Point, Range} = require 'text-buffer'
{deprecate} = require 'grim'
module.exports =
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
Git: require '../src/git'
GitRepository: require '../src/git-repository'
Point: Point
Range: Range
@@ -15,10 +16,20 @@ unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
module.exports.$ = $
module.exports.$$ = $$
module.exports.$$$ = $$$
module.exports.EditorView = require '../src/editor-view'
module.exports.TextEditorView = require '../src/text-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'
Object.defineProperty module.exports, 'Git', get: ->
deprecate "Please require `GitRepository` instead of `Git`: `{GitRepository} = require 'atom'`"
module.exports.GitRepository
Object.defineProperty module.exports, 'EditorView', get: ->
deprecate "Please require `TextEditorView` instead of `EditorView`: `{TextEditorView} = require 'atom'`"
module.exports.TextEditorView
-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!'
+7 -2
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'
@@ -116,7 +119,7 @@
'cmd-shift-right': 'editor:select-to-end-of-line'
'alt-backspace': 'editor:delete-to-beginning-of-word'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-a': 'editor:move-to-beginning-of-line'
'ctrl-a': 'editor:move-to-first-character-of-line'
'ctrl-e': 'editor:move-to-end-of-line'
'ctrl-k': 'editor:cut-to-end-of-line'
@@ -140,6 +143,8 @@
# Sublime Parity
'cmd-enter': 'editor:newline-below'
'cmd-shift-enter': 'editor:newline-above'
'alt-enter': 'editor:newline'
'shift-enter': 'editor:newline'
'cmd-]': 'editor:indent-selected-rows'
'cmd-[': 'editor:outdent-selected-rows'
'ctrl-cmd-up': 'editor:move-line-up'
+10 -3
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'
@@ -11,10 +10,12 @@
'ctrl-shift-i': 'window:toggle-dev-tools'
'ctrl-alt-p': 'window:run-package-specs'
'ctrl-alt-s': 'application:run-all-specs'
'ctrl-shift-o': 'application:open-dev'
'ctrl-alt-o': 'application:open-dev'
'ctrl-shift-o': 'application:open-folder'
'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,6 +27,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 +37,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 +97,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'
@@ -25,8 +25,10 @@
'ctrl-n': 'application:new-file'
'ctrl-s': 'core:save'
'ctrl-S': 'core:save-as'
'ctrl-f4': 'core:close'
'ctrl-w': '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
+21 -1
Ver Arquivo
@@ -18,6 +18,8 @@
{ type: 'separator' }
{ label: 'Install Shell Commands', command: 'window:install-shell-commands' }
{ type: 'separator' }
{ label: 'Services', submenu: [] }
{ type: 'separator' }
{ label: 'Hide Atom', command: 'application:hide' }
{ label: 'Hide Others', command: 'application:hide-other-applications' }
{ label: 'Show All', command: 'application:unhide-all-applications' }
@@ -37,7 +39,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 +111,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' }
@@ -191,3 +194,20 @@
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'separator1': '-'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'separator2': '-'
'Split Up': 'pane:split-up'
'Split Down': 'pane:split-down'
'Split Left': 'pane:split-left'
'Split Right': 'pane:split-right'
'separator3': '-'
+28 -14
Ver Arquivo
@@ -8,14 +8,12 @@
{ label: 'Open Folder...', command: 'application:open-folder' }
{ label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: '&Preferences...', command: 'application:show-settings' }
{ 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: 'Quit', command: 'application:quit' }
@@ -80,6 +78,14 @@
{ label: 'Fold Level 9', command: 'editor:fold-at-indent-level-9' }
]
}
{ type: 'separator' }
{ label: '&Preferences', 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' }
]
}
@@ -108,6 +114,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' }
@@ -132,16 +139,6 @@
submenu: []
}
{
label: '&Window'
submenu: [
{ label: 'Mi&nimize', command: 'application:minimize' }
{ label: 'Ma&ximize', command: 'application:zoom' }
{ type: 'separator' }
{ label: 'Bring &All to Front', command: 'application:bring-all-windows-to-front' }
]
}
{
label: '&Help'
submenu: [
@@ -154,3 +151,20 @@
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'separator1': '-'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'separator2': '-'
'Split Up': 'pane:split-up'
'Split Down': 'pane:split-down'
'Split Left': 'pane:split-left'
'Split Right': 'pane:split-right'
'separator3': '-'
+27 -14
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' }
@@ -28,8 +33,8 @@
{ label: '&Undo', command: 'core:undo' }
{ label: '&Redo', command: 'core:redo' }
{ type: 'separator' }
{ label: '&Cut', command: 'core:cut' }
{ label: 'C&opy', command: 'core:copy' }
{ label: 'Cu&t', command: 'core:cut' }
{ label: '&Copy', command: 'core:copy' }
{ label: 'Copy Pat&h', command: 'editor:copy-path' }
{ label: '&Paste', command: 'core:paste' }
{ label: 'Select &All', command: 'core:select-all' }
@@ -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' }
@@ -151,16 +157,6 @@
submenu: []
}
{
label: '&Window'
submenu: [
{ label: 'Mi&nimize', command: 'application:minimize' }
{ label: 'Ma&ximize', command: 'application:zoom' }
{ type: 'separator' }
{ label: 'Bring &All to Front', command: 'application:bring-all-windows-to-front' }
]
}
{
label: '&Help'
submenu: [
@@ -173,3 +169,20 @@
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'separator1': '-'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'separator2': '-'
'Split Up': 'pane:split-up'
'Split Down': 'pane:split-down'
'Split Left': 'pane:split-left'
'Split Right': 'pane:split-right'
'separator3': '-'
+90 -86
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.103.0",
"version": "0.133.0",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/browser/main.js",
"repository": {
@@ -17,125 +17,129 @@
"url": "http://github.com/atom/atom/raw/master/LICENSE.md"
}
],
"atomShellVersion": "0.13.0",
"atomShellVersion": "0.16.2",
"dependencies": {
"async": "0.2.6",
"atom-keymap": "^0.26.0",
"atom-keymap": "^2.2.0",
"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.3.1",
"event-kit": "0.7.2",
"first-mate": "^2.2.0",
"fs-plus": "^2.2.6",
"fstream": "0.1.24",
"fuzzaldrin": "^1.1",
"git-utils": "^1.3",
"grim": "0.10.0",
"fuzzaldrin": "^2.1",
"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.15.0",
"mixto": "^1",
"mkdirp": "0.3.5",
"nslog": "0.5.0",
"oniguruma": "^1.0.6",
"nslog": "^1.0.1",
"oniguruma": "^3.0.4",
"optimist": "0.4.0",
"pathwatcher": "^1.3.2",
"pathwatcher": "^2.1.3",
"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.2",
"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.2.2",
"theorist": "^1",
"underscore-plus": "^1.4.1",
"space-pen": "3.4.7",
"temp": "0.7.0",
"text-buffer": "^3.2.6",
"theorist": "^1.0.2",
"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.31.0",
"autocomplete": "0.28.0",
"autoflow": "0.17.0",
"autosave": "0.13.0",
"background-tips": "0.14.0",
"bookmarks": "0.22.0",
"bracket-matcher": "0.43.0",
"command-palette": "0.21.0",
"deprecation-cop": "0.6.0",
"dev-live-reload": "0.31.0",
"exception-reporting": "0.18.0",
"atom-dark-syntax": "0.19.0",
"atom-dark-ui": "0.35.0",
"atom-light-syntax": "0.20.0",
"atom-light-ui": "0.30.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.37.0",
"autocomplete": "0.32.0",
"autoflow": "0.18.0",
"autosave": "0.17.0",
"background-tips": "0.17.0",
"bookmarks": "0.28.0",
"bracket-matcher": "0.61.0",
"command-palette": "0.26.0",
"deprecation-cop": "0.10.0",
"dev-live-reload": "0.34.0",
"exception-reporting": "0.20.0",
"feedback": "0.33.0",
"find-and-replace": "0.114.0",
"fuzzy-finder": "0.54.0",
"git-diff": "0.28.0",
"go-to-line": "0.22.0",
"grammar-selector": "0.27.0",
"image-view": "0.34.0",
"keybinding-resolver": "0.18.0",
"link": "0.22.0",
"markdown-preview": "0.74.0",
"metrics": "0.32.0",
"open-on-github": "0.28.0",
"package-generator": "0.30.0",
"release-notes": "0.32.0",
"settings-view": "0.119.0",
"snippets": "0.45.0",
"spell-check": "0.36.0",
"status-bar": "0.40.0",
"styleguide": "0.29.0",
"symbols-view": "0.55.0",
"tabs": "0.41.0",
"timecop": "0.19.0",
"tree-view": "0.98.0",
"find-and-replace": "0.139.0",
"fuzzy-finder": "0.58.0",
"git-diff": "0.39.0",
"go-to-line": "0.25.0",
"grammar-selector": "0.34.0",
"image-view": "0.36.0",
"incompatible-packages": "0.9.0",
"keybinding-resolver": "0.20.0",
"link": "0.25.0",
"markdown-preview": "0.103.0",
"metrics": "0.36.0",
"open-on-github": "0.30.0",
"package-generator": "0.31.0",
"release-notes": "0.36.0",
"settings-view": "0.148.0",
"snippets": "0.53.0",
"spell-check": "0.42.0",
"status-bar": "0.45.0",
"styleguide": "0.30.0",
"symbols-view": "0.66.0",
"tabs": "0.54.0",
"timecop": "0.22.0",
"tree-view": "0.127.0",
"update-package-dependencies": "0.6.0",
"welcome": "0.16.0",
"whitespace": "0.22.0",
"wrap-guide": "0.18.0",
"language-c": "0.16.0",
"language-coffee-script": "0.22.0",
"welcome": "0.18.0",
"whitespace": "0.25.0",
"wrap-guide": "0.22.0",
"language-c": "0.28.0",
"language-coffee-script": "0.35.0",
"language-css": "0.17.0",
"language-gfm": "0.39.0",
"language-gfm": "0.50.0",
"language-git": "0.9.0",
"language-go": "0.12.0",
"language-html": "0.22.0",
"language-hyperlink": "0.10.0",
"language-java": "0.10.0",
"language-javascript": "0.26.0",
"language-go": "0.17.0",
"language-html": "0.26.0",
"language-hyperlink": "0.12.0",
"language-java": "0.11.0",
"language-javascript": "0.40.0",
"language-json": "0.8.0",
"language-less": "0.9.0",
"language-make": "0.10.0",
"language-less": "0.15.0",
"language-make": "0.12.0",
"language-mustache": "0.10.0",
"language-objective-c": "0.11.0",
"language-perl": "0.9.0",
"language-php": "0.15.0",
"language-php": "0.16.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-python": "0.19.0",
"language-ruby": "0.38.0",
"language-ruby-on-rails": "0.18.0",
"language-sass": "0.22.0",
"language-shellscript": "0.8.0",
"language-source": "0.7.0",
"language-sql": "0.8.0",
"language-source": "0.8.0",
"language-sql": "0.11.0",
"language-text": "0.6.0",
"language-todo": "0.10.0",
"language-todo": "0.12.0",
"language-toml": "0.12.0",
"language-xml": "0.14.0",
"language-yaml": "0.6.0"
"language-xml": "0.21.0",
"language-yaml": "0.17.0"
},
"private": true,
"scripts": {
+4 -3
Ver Arquivo
@@ -1,8 +1,9 @@
[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;
Categories=GNOME;GTK;Utility;TextEditor;Development;
MimeType=text/plain;
+3 -1
Ver Arquivo
@@ -1,8 +1,10 @@
Package: <%= name %>
Version: <%= version %>
Depends: python (>= 2.6), libc6
Section: <%= section %>
Priority: optional
Architecture: <%= arch %>
Installed-Size: `du -ks usr|cut -f 1`
Installed-Size: <%= installedSize %>
Maintainer: <%= maintainer %>
Description: <%= description %>
Atom is a free and open source text editor that is modern, approachable, and hackable to the core.
+7
Ver Arquivo
@@ -0,0 +1,7 @@
atom: arch-dependent-file-in-usr-share
atom: changelog-file-missing-in-native-package
atom: copyright-file-contains-full-apache-2-license
atom: copyright-should-refer-to-common-license-file-for-apache-2
atom: embedded-library
atom: package-installs-python-bytecode
atom: unstripped-binary-or-object
+48 -11
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;
@@ -24,27 +26,62 @@ function executeCommands(commands, done, index) {
function bootstrap() {
var apmInstallPath = path.resolve(__dirname, '..', 'apm');
if (!fs.existsSync(apmInstallPath))
fs.mkdirSync(apmInstallPath);
fs.mkdirSync(apmInstallPath);
if (!fs.existsSync(path.join(apmInstallPath, 'node_modules')))
fs.mkdirSync(path.join(apmInstallPath, 'node_modules'));
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'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'oniguruma', 'roaster', 'season', 'grim'];
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 -6
Ver Arquivo
@@ -5,9 +5,6 @@ var path = require('path');
process.chdir(path.dirname(__dirname));
if (process.platform == 'linux')
throw new Error('cibuild can not run on linux yet!');
var homeDir = process.platform == 'win32' ? process.env.USERPROFILE : process.env.HOME;
function loadEnvironmentVariables(filePath) {
@@ -19,12 +16,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 if (process.platform === 'darwin') {
loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials');
loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain');
}
}
readEnvironmentVariables();
Arquivo executável
+13
Ver Arquivo
@@ -0,0 +1,13 @@
#!/bin/bash
set -e
export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN
if [ -d /usr/local/share/nodenv ]; then
export NODENV_ROOT=/usr/local/share/nodenv
export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH
export NODENV_VERSION="v0.10.21"
fi
script/cibuild
+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'],
];
+19 -7
Ver Arquivo
@@ -13,23 +13,35 @@ CONTROL_FILE="$3"
DESKTOP_FILE="$4"
ICON_FILE="$5"
DEB_PATH="$6"
FILE_MODE=755
TARGET_ROOT="`mktemp -d`"
chmod 755 "$TARGET_ROOT"
chmod $FILE_MODE "$TARGET_ROOT"
TARGET="$TARGET_ROOT/atom-$VERSION-$ARCH"
mkdir -p "$TARGET/usr"
mkdir -m $FILE_MODE -p "$TARGET/usr"
env INSTALL_PREFIX="$TARGET/usr" script/grunt install
mkdir -p "$TARGET/DEBIAN"
mkdir -m $FILE_MODE -p "$TARGET/DEBIAN"
cp "$CONTROL_FILE" "$TARGET/DEBIAN/control"
mkdir -p "$TARGET/usr/share/applications"
mkdir -m $FILE_MODE -p "$TARGET/usr/share/applications"
cp "$DESKTOP_FILE" "$TARGET/usr/share/applications"
mkdir -p "$TARGET/usr/share/pixmaps"
mkdir -m $FILE_MODE -p "$TARGET/usr/share/pixmaps"
cp "$ICON_FILE" "$TARGET/usr/share/pixmaps"
dpkg-deb -b "$TARGET"
# Copy generated LICENSE.md to /usr/share/doc/atom/copyright
mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/atom"
cp "$TARGET/usr/share/atom/resources/app/LICENSE.md" "$TARGET/usr/share/doc/atom/copyright"
# Add lintian overrides
mkdir -m $FILE_MODE -p "$TARGET/usr/share/lintian/overrides"
cp "$ROOT/resources/linux/debian/lintian-overrides" "$TARGET/usr/share/lintian/overrides/atom"
# Remove executable bit from .node files
find "$TARGET" -type f -name "*.node" -exec chmod a-x {} \;
fakeroot dpkg-deb -b "$TARGET"
mv "$TARGET_ROOT/atom-$VERSION-$ARCH.deb" "$DEB_PATH"
rm -rf $TARGET_ROOT
rm -rf "$TARGET_ROOT"
+35 -3
Ver Arquivo
@@ -11,8 +11,15 @@ module.exports = function(cb) {
return;
}
verifyPython27(function(error, pythonSuccessMessage) {
cb(error, (nodeSuccessMessage + "\n" + pythonSuccessMessage).trim());
verifyNpm(function(error, npmSuccessMessage) {
if (error) {
cb(error);
return;
}
verifyPython27(function(error, pythonSuccessMessage) {
cb(error, (nodeSuccessMessage + "\n" + npmSuccessMessage + "\n" + pythonSuccessMessage).trim());
});
});
});
@@ -24,7 +31,7 @@ function verifyNode(cb) {
var nodeMajorVersion = +versionArray[0];
var nodeMinorVersion = +versionArray[1];
if (nodeMajorVersion === 0 && nodeMinorVersion < 10) {
error = "node v0.10 is required to build Atom.";
error = "node v0.10 is required to build Atom, node " + nodeVersion + " is installed.";
cb(error);
}
else {
@@ -32,6 +39,31 @@ function verifyNode(cb) {
}
}
function verifyNpm(cb) {
var localNpmPath = path.resolve(__dirname, '..', '..', 'build', 'node_modules', '.bin', 'npm');
if (process.platform === 'win32')
localNpmPath += ".cmd";
var npmCommand = fs.existsSync(localNpmPath) ? localNpmPath : 'npm';
if (npmCommand === 'npm' && process.platform === 'win32')
npmCommand += ".cmd";
childProcess.execFile(npmCommand, ['-v'], { env: process.env }, function(err, stdout) {
if (err)
return cb("npm 1.4 is required to build Atom. An error (" + err + ") occured when checking the version.");
var npmVersion = stdout ? stdout.trim() : '';
var versionArray = npmVersion.split('.');
var npmMajorVersion = +versionArray[0] || 0;
var npmMinorVersion = +versionArray[1] || 0;
if (npmMajorVersion === 1 && npmMinorVersion < 4)
cb("npm v1.4+ is required to build Atom.");
else
cb(null, "npm: v" + npmVersion);
});
}
function verifyPython27(cb) {
if (process.platform == 'win32') {
if (!pythonExecutable) {
+42 -1
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) ->
@@ -69,6 +76,9 @@ class AtomReporter extends View
@addSpecs(specs)
$(document.body).append this
@on 'click', '.stack-trace', ->
$(this).toggleClass('expanded')
reportRunnerResults: (runner) ->
@updateSpecCounts()
@status.addClass('alert-success').removeClass('alert-info') if @failedCount is 0
@@ -88,14 +98,44 @@ 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}) =>
$(document).on "click", ".spec-toggle", ({currentTarget}) ->
element = $(currentTarget)
specFailures = element.parent().find('.spec-failures')
specFailures.toggle()
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 +215,7 @@ class AtomReporter extends View
specView = new SpecResultView(spec)
specView.attach()
@failedCount++
@addDeprecations(spec)
class SuiteResultView extends View
@content: ->
+34 -517
Ver Arquivo
@@ -6,532 +6,49 @@ ThemeManager = require '../src/theme-manager'
describe "the `atom` global", ->
beforeEach ->
atom.workspaceView = new WorkspaceView
atom.workspaceView = atom.workspace.getView(atom.workspace).__spacePenView
describe "package lifecycle methods", ->
describe ".loadPackage(name)", ->
it "continues if the package has an invalid package.json", ->
spyOn(console, 'warn')
atom.config.set("core.disabledPackages", [])
expect(-> atom.packages.loadPackage("package-with-broken-package-json")).not.toThrow()
it "continues if the package has an invalid keymap", ->
atom.config.set("core.disabledPackages", [])
expect(-> atom.packages.loadPackage("package-with-broken-keymap")).not.toThrow()
describe ".unloadPackage(name)", ->
describe "when the package is active", ->
it "throws an error", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-main').then (p) -> pack = p
runs ->
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
expect(atom.packages.isPackageActive(pack.name)).toBeTruthy()
expect( -> atom.packages.unloadPackage(pack.name)).toThrow()
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
expect(atom.packages.isPackageActive(pack.name)).toBeTruthy()
describe "when the package is not loaded", ->
it "throws an error", ->
expect(atom.packages.isPackageLoaded('unloaded')).toBeFalsy()
expect( -> atom.packages.unloadPackage('unloaded')).toThrow()
expect(atom.packages.isPackageLoaded('unloaded')).toBeFalsy()
describe "when the package is loaded", ->
it "no longers reports it as being loaded", ->
pack = atom.packages.loadPackage('package-with-main')
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
atom.packages.unloadPackage(pack.name)
expect(atom.packages.isPackageLoaded(pack.name)).toBeFalsy()
describe ".activatePackage(id)", ->
describe "atom packages", ->
describe "when called multiple times", ->
it "it only calls activate on the package once", ->
spyOn(Package.prototype, 'activateNow').andCallThrough()
atom.packages.activatePackage('package-with-index')
atom.packages.activatePackage('package-with-index')
waitsForPromise ->
atom.packages.activatePackage('package-with-index')
runs ->
expect(Package.prototype.activateNow.callCount).toBe 1
describe "when the package has a main module", ->
describe "when the metadata specifies a main module path˜", ->
it "requires the module at the specified path", ->
mainModule = require('./fixtures/packages/package-with-main/main-module')
spyOn(mainModule, 'activate')
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-main').then (p) -> pack = p
runs ->
expect(mainModule.activate).toHaveBeenCalled()
expect(pack.mainModule).toBe mainModule
describe "when the metadata does not specify a main module", ->
it "requires index.coffee", ->
indexModule = require('./fixtures/packages/package-with-index/index')
spyOn(indexModule, 'activate')
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-index').then (p) -> pack = p
runs ->
expect(indexModule.activate).toHaveBeenCalled()
expect(pack.mainModule).toBe indexModule
it "assigns config defaults from the module", ->
expect(atom.config.get('package-with-config-defaults.numbers.one')).toBeUndefined()
waitsForPromise ->
atom.packages.activatePackage('package-with-config-defaults')
runs ->
expect(atom.config.get('package-with-config-defaults.numbers.one')).toBe 1
expect(atom.config.get('package-with-config-defaults.numbers.two')).toBe 2
describe "when the package metadata includes activation events", ->
[mainModule, promise] = []
beforeEach ->
mainModule = require './fixtures/packages/package-with-activation-events/index'
spyOn(mainModule, 'activate').andCallThrough()
spyOn(Package.prototype, 'requireMainModule').andCallThrough()
promise = atom.packages.activatePackage('package-with-activation-events')
it "defers requiring/activating the main module until an activation event bubbles to the root view", ->
expect(promise.isFulfilled()).not.toBeTruthy()
atom.workspaceView.trigger 'activation-event'
waitsForPromise ->
promise
it "triggers the activation event on all handlers registered during activation", ->
waitsForPromise ->
atom.workspaceView.open()
runs ->
editorView = atom.workspaceView.getActiveView()
eventHandler = jasmine.createSpy("activation-event")
editorView.command 'activation-event', eventHandler
editorView.trigger 'activation-event'
expect(mainModule.activate.callCount).toBe 1
expect(mainModule.activationEventCallCount).toBe 1
expect(eventHandler.callCount).toBe 1
editorView.trigger 'activation-event'
expect(mainModule.activationEventCallCount).toBe 2
expect(eventHandler.callCount).toBe 2
expect(mainModule.activate.callCount).toBe 1
it "activates the package immediately when the events are empty", ->
mainModule = require './fixtures/packages/package-with-empty-activation-events/index'
spyOn(mainModule, 'activate').andCallThrough()
waitsForPromise ->
atom.packages.activatePackage('package-with-empty-activation-events')
runs ->
expect(mainModule.activate.callCount).toBe 1
describe "when the package has no main module", ->
it "does not throw an exception", ->
spyOn(console, "error")
spyOn(console, "warn").andCallThrough()
expect(-> atom.packages.activatePackage('package-without-module')).not.toThrow()
expect(console.error).not.toHaveBeenCalled()
expect(console.warn).not.toHaveBeenCalled()
it "passes the activate method the package's previously serialized state if it exists", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage("package-with-serialization").then (p) -> pack = p
runs ->
expect(pack.mainModule.someNumber).not.toBe 77
pack.mainModule.someNumber = 77
atom.packages.deactivatePackage("package-with-serialization")
spyOn(pack.mainModule, 'activate').andCallThrough()
atom.packages.activatePackage("package-with-serialization")
expect(pack.mainModule.activate).toHaveBeenCalledWith({someNumber: 77})
it "logs warning instead of throwing an exception if the package fails to load", ->
atom.config.set("core.disabledPackages", [])
spyOn(console, "warn")
expect(-> atom.packages.activatePackage("package-that-throws-an-exception")).not.toThrow()
expect(console.warn).toHaveBeenCalled()
describe "keymap loading", ->
describe "when the metadata does not contain a 'keymaps' manifest", ->
it "loads all the .cson/.json files in the keymaps directory", ->
element1 = $$ -> @div class: 'test-1'
element2 = $$ -> @div class: 'test-2'
element3 = $$ -> @div class: 'test-3'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element2[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element3[0])).toHaveLength 0
atom.packages.activatePackage("package-with-keymaps")
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])[0].command).toBe "test-1"
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element2[0])[0].command).toBe "test-2"
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element3[0])).toHaveLength 0
describe "when the metadata contains a 'keymaps' manifest", ->
it "loads only the keymaps specified by the manifest, in the specified order", ->
element1 = $$ -> @div class: 'test-1'
element3 = $$ -> @div class: 'test-3'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])).toHaveLength 0
atom.packages.activatePackage("package-with-keymaps-manifest")
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])[0].command).toBe 'keymap-1'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-n', target:element1[0])[0].command).toBe 'keymap-2'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-y', target:element3[0])).toHaveLength 0
describe "menu loading", ->
beforeEach ->
atom.contextMenu.definitions = []
atom.menu.template = []
describe "when the metadata does not contain a 'menus' manifest", ->
it "loads all the .cson/.json files in the menus directory", ->
element = ($$ -> @div class: 'test-1')[0]
expect(atom.contextMenu.definitionsForElement(element)).toEqual []
atom.packages.activatePackage("package-with-menus")
expect(atom.menu.template.length).toBe 2
expect(atom.menu.template[0].label).toBe "Second to Last"
expect(atom.menu.template[1].label).toBe "Last"
expect(atom.contextMenu.definitionsForElement(element)[0].label).toBe "Menu item 1"
expect(atom.contextMenu.definitionsForElement(element)[1].label).toBe "Menu item 2"
expect(atom.contextMenu.definitionsForElement(element)[2].label).toBe "Menu item 3"
describe "when the metadata contains a 'menus' manifest", ->
it "loads only the menus specified by the manifest, in the specified order", ->
element = ($$ -> @div class: 'test-1')[0]
expect(atom.contextMenu.definitionsForElement(element)).toEqual []
atom.packages.activatePackage("package-with-menus-manifest")
expect(atom.menu.template[0].label).toBe "Second to Last"
expect(atom.menu.template[1].label).toBe "Last"
expect(atom.contextMenu.definitionsForElement(element)[0].label).toBe "Menu item 2"
expect(atom.contextMenu.definitionsForElement(element)[1].label).toBe "Menu item 1"
expect(atom.contextMenu.definitionsForElement(element)[2]).toBeUndefined()
describe "stylesheet loading", ->
describe "when the metadata contains a 'stylesheets' manifest", ->
it "loads stylesheets from the stylesheets directory as specified by the manifest", ->
one = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/3.css")
one = atom.themes.stringToId(one)
two = atom.themes.stringToId(two)
three = atom.themes.stringToId(three)
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
atom.packages.activatePackage("package-with-stylesheets-manifest")
expect(atom.themes.stylesheetElementForId(one)).toExist()
expect(atom.themes.stylesheetElementForId(two)).toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
expect($('#jasmine-content').css('font-size')).toBe '1px'
describe "when the metadata does not contain a 'stylesheets' manifest", ->
it "loads all stylesheets from the stylesheets directory", ->
one = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/3.css")
one = atom.themes.stringToId(one)
two = atom.themes.stringToId(two)
three = atom.themes.stringToId(three)
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
atom.packages.activatePackage("package-with-stylesheets")
expect(atom.themes.stylesheetElementForId(one)).toExist()
expect(atom.themes.stylesheetElementForId(two)).toExist()
expect(atom.themes.stylesheetElementForId(three)).toExist()
expect($('#jasmine-content').css('font-size')).toBe '3px'
describe "grammar loading", ->
it "loads the package's grammars", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-grammars')
runs ->
expect(atom.syntax.selectGrammar('a.alot').name).toBe 'Alot'
expect(atom.syntax.selectGrammar('a.alittle').name).toBe 'Alittle'
describe "scoped-property loading", ->
it "loads the scoped properties", ->
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
describe "converted textmate packages", ->
it "loads the package's grammars", ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Ruby"
it "loads the translated scoped properties", ->
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBe '# '
describe ".deactivatePackage(id)", ->
describe "atom packages", ->
it "calls `deactivate` on the package's main module if activate was successful", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage("package-with-deactivate").then (p) -> pack = p
runs ->
expect(atom.packages.isPackageActive("package-with-deactivate")).toBeTruthy()
spyOn(pack.mainModule, 'deactivate').andCallThrough()
atom.packages.deactivatePackage("package-with-deactivate")
expect(pack.mainModule.deactivate).toHaveBeenCalled()
expect(atom.packages.isPackageActive("package-with-module")).toBeFalsy()
spyOn(console, 'warn')
badPack = null
waitsForPromise ->
atom.packages.activatePackage("package-that-throws-on-activate").then (p) -> badPack = p
runs ->
expect(atom.packages.isPackageActive("package-that-throws-on-activate")).toBeTruthy()
spyOn(badPack.mainModule, 'deactivate').andCallThrough()
atom.packages.deactivatePackage("package-that-throws-on-activate")
expect(badPack.mainModule.deactivate).not.toHaveBeenCalled()
expect(atom.packages.isPackageActive("package-that-throws-on-activate")).toBeFalsy()
it "does not serialize packages that have not been activated called on their main module", ->
spyOn(console, 'warn')
badPack = null
waitsForPromise ->
atom.packages.activatePackage("package-that-throws-on-activate").then (p) -> badPack = p
runs ->
spyOn(badPack.mainModule, 'serialize').andCallThrough()
atom.packages.deactivatePackage("package-that-throws-on-activate")
expect(badPack.mainModule.serialize).not.toHaveBeenCalled()
it "absorbs exceptions that are thrown by the package module's serialize methods", ->
spyOn(console, 'error')
waitsForPromise ->
atom.packages.activatePackage('package-with-serialize-error')
waitsForPromise ->
atom.packages.activatePackage('package-with-serialization')
runs ->
atom.packages.deactivatePackages()
expect(atom.packages.packageStates['package-with-serialize-error']).toBeUndefined()
expect(atom.packages.packageStates['package-with-serialization']).toEqual someNumber: 1
expect(console.error).toHaveBeenCalled()
it "removes the package's grammars", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-grammars')
runs ->
atom.packages.deactivatePackage('package-with-grammars')
expect(atom.syntax.selectGrammar('a.alot').name).toBe 'Null Grammar'
expect(atom.syntax.selectGrammar('a.alittle').name).toBe 'Null Grammar'
it "removes the package's keymaps", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-keymaps')
runs ->
atom.packages.deactivatePackage('package-with-keymaps')
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target: ($$ -> @div class: 'test-1')[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target: ($$ -> @div class: 'test-2')[0])).toHaveLength 0
it "removes the package's stylesheets", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-stylesheets')
runs ->
atom.packages.deactivatePackage('package-with-stylesheets')
one = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/3.css")
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
it "removes the package's scoped-properties", ->
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
atom.packages.deactivatePackage("package-with-scoped-properties")
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBeUndefined()
describe "textmate packages", ->
it "removes the package's grammars", ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Ruby"
atom.packages.deactivatePackage('language-ruby')
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
it "removes the package's scoped properties", ->
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
atom.packages.deactivatePackage('language-ruby')
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
describe ".activate()", ->
packageActivator = null
themeActivator = null
describe 'window sizing methods', ->
describe '::getPosition and ::setPosition', ->
it 'sets the position of the window, and can retrieve the position just set', ->
atom.setPosition(22, 45)
expect(atom.getPosition()).toEqual x: 22, y: 45
describe '::getSize and ::setSize', ->
originalSize = null
beforeEach ->
spyOn(console, 'warn')
atom.packages.loadPackages()
loadedPackages = atom.packages.getLoadedPackages()
expect(loadedPackages.length).toBeGreaterThan 0
packageActivator = spyOn(atom.packages, 'activatePackages')
themeActivator = spyOn(atom.themes, 'activatePackages')
originalSize = atom.getSize()
afterEach ->
atom.packages.unloadPackages()
atom.setSize(originalSize.width, originalSize.height)
Syntax = require '../src/syntax'
atom.syntax = window.syntax = new Syntax()
it "activates all the packages, and none of the themes", ->
atom.packages.activate()
expect(packageActivator).toHaveBeenCalled()
expect(themeActivator).toHaveBeenCalled()
packages = packageActivator.mostRecentCall.args[0]
expect(['atom', 'textmate']).toContain(pack.getType()) for pack in packages
themes = themeActivator.mostRecentCall.args[0]
expect(['theme']).toContain(theme.getType()) for theme in themes
describe ".enablePackage() and disablePackage()", ->
describe "with packages", ->
it ".enablePackage() enables a disabled package", ->
packageName = 'package-with-main'
atom.config.pushAtKeyPath('core.disabledPackages', packageName)
atom.packages.observeDisabledPackages()
expect(atom.config.get('core.disabledPackages')).toContain packageName
pack = atom.packages.enablePackage(packageName)
loadedPackages = atom.packages.getLoadedPackages()
activatedPackages = null
waitsFor ->
activatedPackages = atom.packages.getActivePackages()
activatedPackages.length > 0
runs ->
expect(loadedPackages).toContain(pack)
expect(activatedPackages).toContain(pack)
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
it ".disablePackage() disables an enabled package", ->
packageName = 'package-with-main'
waitsForPromise ->
atom.packages.activatePackage(packageName)
runs ->
atom.packages.observeDisabledPackages()
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
pack = atom.packages.disablePackage(packageName)
activatedPackages = atom.packages.getActivePackages()
expect(activatedPackages).not.toContain(pack)
expect(atom.config.get('core.disabledPackages')).toContain packageName
describe "with themes", ->
beforeEach ->
waitsForPromise ->
atom.themes.activateThemes()
afterEach ->
atom.themes.deactivateThemes()
atom.config.unobserve('core.themes')
it ".enablePackage() and .disablePackage() enables and disables a theme", ->
packageName = 'theme-with-package-file'
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
# enabling of theme
pack = atom.packages.enablePackage(packageName)
waitsFor ->
pack in atom.packages.getActivePackages()
runs ->
expect(atom.config.get('core.themes')).toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
# disabling of theme
pack = atom.packages.disablePackage(packageName)
waitsFor ->
not (pack in atom.packages.getActivePackages())
runs ->
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
it 'sets the size of the window, and can retrieve the size just set', ->
atom.setSize(100, 400)
expect(atom.getSize()).toEqual width: 100, height: 400
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'
describe "loading default config", ->
it 'loads the default core config', ->
expect(atom.config.get('core.excludeVcsIgnoredPaths')).toBe true
expect(atom.config.get('editor.showInvisibles')).toBe false
+191
Ver Arquivo
@@ -0,0 +1,191 @@
CommandRegistry = require '../src/command-registry'
describe "CommandRegistry", ->
[registry, parent, child, grandchild] = []
beforeEach ->
parent = document.createElement("div")
child = document.createElement("div")
grandchild = document.createElement("div")
parent.classList.add('parent')
child.classList.add('child')
grandchild.classList.add('grandchild')
child.appendChild(grandchild)
parent.appendChild(child)
document.querySelector('#jasmine-content').appendChild(parent)
registry = new CommandRegistry(parent)
describe "command dispatch", ->
it "invokes callbacks with selectors matching the target", ->
called = false
registry.add '.grandchild', 'command', (event) ->
expect(this).toBe grandchild
expect(event.type).toBe 'command'
expect(event.eventPhase).toBe Event.BUBBLING_PHASE
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe grandchild
called = true
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(called).toBe true
it "invokes callbacks with selectors matching ancestors of the target", ->
calls = []
registry.add '.child', 'command', (event) ->
expect(this).toBe child
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe child
calls.push('child')
registry.add '.parent', 'command', (event) ->
expect(this).toBe parent
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe parent
calls.push('parent')
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['child', 'parent']
it "orders multiple matching listeners for an element by selector specificity", ->
child.classList.add('foo', 'bar')
calls = []
registry.add '.foo.bar', 'command', -> calls.push('.foo.bar')
registry.add '.foo', 'command', -> calls.push('.foo')
registry.add '.bar', 'command', -> calls.push('.bar') # specificity ties favor commands added later, like CSS
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['.foo.bar', '.bar', '.foo']
it "stops bubbling through ancestors when .stopPropagation() is called on the event", ->
calls = []
registry.add '.parent', 'command', -> calls.push('parent')
registry.add '.child', 'command', -> calls.push('child-2')
registry.add '.child', 'command', (event) -> calls.push('child-1'); event.stopPropagation()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'stopPropagation')
grandchild.dispatchEvent(dispatchedEvent)
expect(calls).toEqual ['child-1', 'child-2']
expect(dispatchedEvent.stopPropagation).toHaveBeenCalled()
it "stops invoking callbacks when .stopImmediatePropagation() is called on the event", ->
calls = []
registry.add '.parent', 'command', -> calls.push('parent')
registry.add '.child', 'command', -> calls.push('child-2')
registry.add '.child', 'command', (event) -> calls.push('child-1'); event.stopImmediatePropagation()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'stopImmediatePropagation')
grandchild.dispatchEvent(dispatchedEvent)
expect(calls).toEqual ['child-1']
expect(dispatchedEvent.stopImmediatePropagation).toHaveBeenCalled()
it "forwards .preventDefault() calls from the synthetic event to the original", ->
calls = []
registry.add '.child', 'command', (event) -> event.preventDefault()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'preventDefault')
grandchild.dispatchEvent(dispatchedEvent)
expect(dispatchedEvent.preventDefault).toHaveBeenCalled()
it "allows listeners to be removed via a disposable returned by ::add", ->
calls = []
disposable1 = registry.add '.parent', 'command', -> calls.push('parent')
disposable2 = registry.add '.child', 'command', -> calls.push('child')
disposable1.dispose()
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['child']
calls = []
disposable2.dispose()
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual []
it "allows multiple commands to be registered under one selector when called with an object", ->
calls = []
disposable = registry.add '.child',
'command-1': -> calls.push('command-1')
'command-2': -> calls.push('command-2')
grandchild.dispatchEvent(new CustomEvent('command-1', bubbles: true))
grandchild.dispatchEvent(new CustomEvent('command-2', bubbles: true))
expect(calls).toEqual ['command-1', 'command-2']
calls = []
disposable.dispose()
grandchild.dispatchEvent(new CustomEvent('command-1', bubbles: true))
grandchild.dispatchEvent(new CustomEvent('command-2', bubbles: true))
expect(calls).toEqual []
describe "::findCommands({target})", ->
it "returns commands that can be invoked on the target or its ancestors", ->
registry.add '.parent', 'namespace:command-1', ->
registry.add '.child', 'namespace:command-2', ->
registry.add '.grandchild', 'namespace:command-3', ->
registry.add '.grandchild.no-match', 'namespace:command-4', ->
expect(registry.findCommands(target: grandchild)[0..2]).toEqual [
{name: 'namespace:command-3', displayName: 'Namespace: Command 3'}
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
describe "::dispatch(target, commandName)", ->
it "simulates invocation of the given command ", ->
called = false
registry.add '.grandchild', 'command', (event) ->
expect(this).toBe grandchild
expect(event.type).toBe 'command'
expect(event.eventPhase).toBe Event.BUBBLING_PHASE
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe grandchild
called = true
registry.dispatch(grandchild, 'command')
expect(called).toBe true
it "returns a boolean indicating whether any listeners matched the command", ->
registry.add '.grandchild', 'command', ->
expect(registry.dispatch(grandchild, 'command')).toBe true
expect(registry.dispatch(grandchild, 'bogus')).toBe false
expect(registry.dispatch(parent, 'command')).toBe false
describe "::getSnapshot and ::restoreSnapshot", ->
it "removes all command handlers except for those in the snapshot", ->
registry.add '.parent', 'namespace:command-1', ->
registry.add '.child', 'namespace:command-2', ->
snapshot = registry.getSnapshot()
registry.add '.grandchild', 'namespace:command-3', ->
expect(registry.findCommands(target: grandchild)[0..2]).toEqual [
{name: 'namespace:command-3', displayName: 'Namespace: Command 3'}
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
registry.restoreSnapshot(snapshot)
expect(registry.findCommands(target: grandchild)[0..1]).toEqual [
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
registry.add '.grandchild', 'namespace:command-3', ->
registry.restoreSnapshot(snapshot)
expect(registry.findCommands(target: grandchild)[0..1]).toEqual [
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
+488 -19
Ver Arquivo
@@ -12,7 +12,7 @@ describe "Config", ->
describe ".get(keyPath)", ->
it "allows a key path's value to be read", ->
expect(atom.config.set("foo.bar.baz", 42)).toBe 42
expect(atom.config.set("foo.bar.baz", 42)).toBe true
expect(atom.config.get("foo.bar.baz")).toBe 42
expect(atom.config.get("bogus.key.path")).toBeUndefined()
@@ -23,9 +23,21 @@ 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
expect(atom.config.set("foo.bar.baz", 42)).toBe true
expect(atom.config.get("foo.bar.baz")).toBe 42
it "updates observers and saves when a key path is set", ->
@@ -36,7 +48,7 @@ describe "Config", ->
atom.config.set("foo.bar.baz", 42)
expect(atom.config.save).toHaveBeenCalled()
expect(observeHandler).toHaveBeenCalledWith 42, {previous: undefined}
expect(observeHandler).toHaveBeenCalledWith 42
describe "when the value equals the default value", ->
it "does not store the value", ->
@@ -127,7 +139,7 @@ describe "Config", ->
expect(atom.config.pushAtKeyPath("foo.bar.baz", "b")).toBe 2
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['a']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".unshiftAtKeyPath(keyPath, value)", ->
it "unshifts the given value to the array at the key path and updates observers", ->
@@ -138,7 +150,7 @@ describe "Config", ->
expect(atom.config.unshiftAtKeyPath("foo.bar.baz", "a")).toBe 2
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['b']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".removeAtKeyPath(keyPath, value)", ->
it "removes the given value from the array at the key path and updates observers", ->
@@ -149,16 +161,22 @@ describe "Config", ->
expect(atom.config.removeAtKeyPath("foo.bar.baz", "b")).toEqual ["a", "c"]
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "c"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['a', 'b', 'c']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".getPositiveInt(keyPath, defaultValue)", ->
it "returns the proper current or default value", ->
it "returns the proper coerced value", ->
atom.config.set('editor.preferredLineLength', 0)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 1
it "returns the proper coerced value", ->
atom.config.set('editor.preferredLineLength', -1234)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 1
it "returns the default value when a string is passed in", ->
atom.config.set('editor.preferredLineLength', 'abcd')
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
it "returns the default value when null is passed in", ->
atom.config.set('editor.preferredLineLength', null)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
@@ -214,11 +232,54 @@ describe "Config", ->
it "emits an updated event", ->
updatedCallback = jasmine.createSpy('updated')
atom.config.observe('foo.bar.baz.a', callNow: false, updatedCallback)
atom.config.onDidChange('foo.bar.baz.a', updatedCallback)
expect(updatedCallback.callCount).toBe 0
atom.config.setDefaults("foo.bar.baz", a: 2)
expect(updatedCallback.callCount).toBe 1
describe ".onDidChange(keyPath)", ->
[observeHandler, observeSubscription] = []
describe 'when a keyPath is specified', ->
beforeEach ->
observeHandler = jasmine.createSpy("observeHandler")
atom.config.set("foo.bar.baz", "value 1")
observeSubscription = atom.config.onDidChange "foo.bar.baz", observeHandler
it "does not fire the given callback with the current value at the keypath", ->
expect(observeHandler).not.toHaveBeenCalled()
it "fires the callback every time the observed value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 2', oldValue: 'value 1', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 1', oldValue: 'value 2', keyPath: 'foo.bar.baz'})
describe 'when a keyPath is not specified', ->
beforeEach ->
observeHandler = jasmine.createSpy("observeHandler")
atom.config.set("foo.bar.baz", "value 1")
observeSubscription = atom.config.onDidChange observeHandler
it "does not fire the given callback initially", ->
expect(observeHandler).not.toHaveBeenCalled()
it "fires the callback every time any value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 2', oldValue: 'value 1', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 1', oldValue: 'value 2', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.int', 1)
expect(observeHandler).toHaveBeenCalledWith({newValue: 1, oldValue: undefined, keyPath: 'foo.bar.int'})
describe ".observe(keyPath)", ->
[observeHandler, observeSubscription] = []
@@ -233,26 +294,25 @@ describe "Config", ->
it "fires the callback every time the observed value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith("value 2", {previous: 'value 1'})
expect(observeHandler).toHaveBeenCalledWith("value 2")
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith("value 1", {previous: 'value 2'})
expect(observeHandler).toHaveBeenCalledWith("value 1")
it "fires the callback when the observed value is deleted", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
expect(observeHandler).toHaveBeenCalledWith(undefined)
it "fires the callback when the full key path goes into and out of existence", ->
observeHandler.reset() # clear the initial call
atom.config.set("foo.bar", undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
observeHandler.reset()
atom.config.set("foo.bar.baz", "i'm back")
expect(observeHandler).toHaveBeenCalledWith("i'm back", {previous: undefined})
expect(observeHandler).toHaveBeenCalledWith("i'm back")
it "does not fire the callback once the observe subscription is off'ed", ->
observeHandler.reset() # clear the initial call
@@ -299,11 +359,19 @@ describe "Config", ->
describe "when the config file contains valid cson", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
atom.config.loadUserConfig()
it "updates the config data based on the file contents", ->
atom.config.loadUserConfig()
expect(atom.config.get("foo.bar")).toBe 'baz'
it "notifies observers for updated keypaths on load", ->
observeHandler = jasmine.createSpy("observeHandler")
observeSubscription = atom.config.observe "foo.bar", observeHandler
atom.config.loadUserConfig()
expect(observeHandler).toHaveBeenCalledWith 'baz'
describe "when the config file contains invalid cson", ->
beforeEach ->
spyOn(console, 'error')
@@ -322,10 +390,43 @@ describe "Config", ->
expect(fs.existsSync(atom.config.configFilePath)).toBe true
expect(CSON.readFileSync(atom.config.configFilePath)).toEqual {}
describe "when a schema is specified", ->
beforeEach ->
schema =
type: 'object'
properties:
bar:
type: 'string'
default: 'def'
int:
type: 'integer'
default: 12
atom.config.setSchema('foo', schema)
describe "when the config file contains values that do not adhere to the schema", ->
warnSpy = null
beforeEach ->
warnSpy = spyOn console, 'warn'
fs.writeFileSync atom.config.configFilePath, """
foo:
bar: 'baz'
int: 'bad value'
"""
atom.config.loadUserConfig()
it "updates the only the settings that have values matching the schema", ->
expect(atom.config.get("foo.bar")).toBe 'baz'
expect(atom.config.get("foo.int")).toBe 12
expect(warnSpy).toHaveBeenCalled()
expect(warnSpy.mostRecentCall.args[0]).toContain "'foo.int' could not be set"
describe ".observeUserConfig()", ->
updatedHandler = null
beforeEach ->
atom.config.setDefaults('foo', bar: 'def')
atom.config.configDirPath = dotAtomPath
atom.config.configFilePath = path.join(atom.config.configDirPath, "atom.config.cson")
expect(fs.existsSync(atom.config.configDirPath)).toBeFalsy()
@@ -333,7 +434,7 @@ describe "Config", ->
atom.config.loadUserConfig()
atom.config.observeUserConfig()
updatedHandler = jasmine.createSpy("updatedHandler")
atom.config.on 'updated', updatedHandler
atom.config.onDidChange updatedHandler
afterEach ->
atom.config.unobserveUserConfig()
@@ -347,6 +448,34 @@ describe "Config", ->
expect(atom.config.get('foo.bar')).toBe 'quux'
expect(atom.config.get('foo.baz')).toBe 'bar'
describe "when the config file changes to omit a setting with a default", ->
it "resets the setting back to the default", ->
fs.writeFileSync(atom.config.configFilePath, "foo: { baz: 'new'}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(atom.config.get('foo.bar')).toBe 'def'
expect(atom.config.get('foo.baz')).toBe 'new'
describe "when the config file changes to be empty", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "resets all settings back to the defaults", ->
expect(updatedHandler.callCount).toBe 1
expect(atom.config.get('foo.bar')).toBe 'def'
atom.config.set("hair", "blonde") # trigger a save
expect(atom.config.save).toHaveBeenCalled()
describe "when the config file subsequently changes again to contain configuration", ->
beforeEach ->
updatedHandler.reset()
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'newVal'")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "sets the setting to the value specified in the config file", ->
expect(atom.config.get('foo.bar')).toBe 'newVal'
describe "when the config file changes to contain invalid cson", ->
beforeEach ->
spyOn(console, 'error')
@@ -361,9 +490,349 @@ describe "Config", ->
describe "when the config file subsequently changes again to contain valid cson", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'newVal'")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "updates the config data and resumes saving", ->
atom.config.set("hair", "blonde")
expect(atom.config.save).toHaveBeenCalled()
describe "when a schema is specified", ->
schema = null
describe '.setSchema(keyPath, schema)', ->
it 'creates a properly nested schema', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
atom.config.setSchema('foo.bar', schema)
expect(atom.config.getSchema('foo')).toEqual
type: 'object'
properties:
bar:
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
it 'sets defaults specified by the schema', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
anObject:
type: 'object'
properties:
nestedInt:
type: 'integer'
default: 24
nestedObject:
type: 'object'
properties:
superNestedInt:
type: 'integer'
default: 36
atom.config.setSchema('foo.bar', schema)
expect(atom.config.get("foo.bar.anInt")).toBe 12
expect(atom.config.get("foo.bar.anObject")).toEqual
nestedInt: 24
nestedObject:
superNestedInt: 36
it 'can set a non-object schema', ->
schema =
type: 'integer'
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
expect(atom.config.get("foo.bar.anInt")).toBe 12
expect(atom.config.getSchema('foo.bar.anInt')).toEqual
type: 'integer'
default: 12
describe '.getSchema(keyPath)', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
atom.config.setSchema('foo.bar', schema)
expect(atom.config.getSchema('foo.bar')).toEqual
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
expect(atom.config.getSchema('foo.bar.anInt')).toEqual
type: 'integer'
default: 12
describe 'when the value has an "integer" type', ->
beforeEach ->
schema =
type: 'integer'
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'coerces a string to an int', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 123
it 'does not allow infinity', ->
atom.config.set('foo.bar.anInt', Infinity)
expect(atom.config.get('foo.bar.anInt')).toBe 12
it 'coerces a float to an int', ->
atom.config.set('foo.bar.anInt', 12.3)
expect(atom.config.get('foo.bar.anInt')).toBe 12
it 'will not set non-integers', ->
atom.config.set('foo.bar.anInt', null)
expect(atom.config.get('foo.bar.anInt')).toBe 12
atom.config.set('foo.bar.anInt', 'nope')
expect(atom.config.get('foo.bar.anInt')).toBe 12
describe 'when the minimum and maximum keys are used', ->
beforeEach ->
schema =
type: 'integer'
minimum: 10
maximum: 20
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'keeps the specified value within the specified range', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 20
atom.config.set('foo.bar.anInt', '1')
expect(atom.config.get('foo.bar.anInt')).toBe 10
describe 'when the value has an "integer" and "string" type', ->
beforeEach ->
schema =
type: ['integer', 'string']
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'can coerce an int, and fallback to a string', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 123
atom.config.set('foo.bar.anInt', 'cats')
expect(atom.config.get('foo.bar.anInt')).toBe 'cats'
describe 'when the value has an "string" and "boolean" type', ->
beforeEach ->
schema =
type: ['string', 'boolean']
default: 'def'
atom.config.setSchema('foo.bar', schema)
it 'can set a string, a boolean, and revert back to the default', ->
atom.config.set('foo.bar', 'ok')
expect(atom.config.get('foo.bar')).toBe 'ok'
atom.config.set('foo.bar', false)
expect(atom.config.get('foo.bar')).toBe false
atom.config.set('foo.bar', undefined)
expect(atom.config.get('foo.bar')).toBe 'def'
describe 'when the value has a "number" type', ->
beforeEach ->
schema =
type: 'number'
default: 12.1
atom.config.setSchema('foo.bar.aFloat', schema)
it 'coerces a string to a float', ->
atom.config.set('foo.bar.aFloat', '12.23')
expect(atom.config.get('foo.bar.aFloat')).toBe 12.23
it 'will not set non-numbers', ->
atom.config.set('foo.bar.aFloat', null)
expect(atom.config.get('foo.bar.aFloat')).toBe 12.1
atom.config.set('foo.bar.aFloat', 'nope')
expect(atom.config.get('foo.bar.aFloat')).toBe 12.1
describe 'when the minimum and maximum keys are used', ->
beforeEach ->
schema =
type: 'number'
minimum: 11.2
maximum: 25.4
default: 12.1
atom.config.setSchema('foo.bar.aFloat', schema)
it 'keeps the specified value within the specified range', ->
atom.config.set('foo.bar.aFloat', '123.2')
expect(atom.config.get('foo.bar.aFloat')).toBe 25.4
atom.config.set('foo.bar.aFloat', '1.0')
expect(atom.config.get('foo.bar.aFloat')).toBe 11.2
describe 'when the value has a "boolean" type', ->
beforeEach ->
schema =
type: 'boolean'
default: true
atom.config.setSchema('foo.bar.aBool', schema)
it 'coerces various types to a boolean', ->
atom.config.set('foo.bar.aBool', 'true')
expect(atom.config.get('foo.bar.aBool')).toBe true
atom.config.set('foo.bar.aBool', 'false')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 'TRUE')
expect(atom.config.get('foo.bar.aBool')).toBe true
atom.config.set('foo.bar.aBool', 'FALSE')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 1)
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 0)
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', {})
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', null)
expect(atom.config.get('foo.bar.aBool')).toBe false
it 'reverts back to the default value when undefined is passed to set', ->
atom.config.set('foo.bar.aBool', 'false')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', undefined)
expect(atom.config.get('foo.bar.aBool')).toBe true
describe 'when the value has an "string" type', ->
beforeEach ->
schema =
type: 'string'
default: 'ok'
atom.config.setSchema('foo.bar.aString', schema)
it 'allows strings', ->
atom.config.set('foo.bar.aString', 'yep')
expect(atom.config.get('foo.bar.aString')).toBe 'yep'
it 'will only set strings', ->
expect(atom.config.set('foo.bar.aString', 123)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', true)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', null)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', [])).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', nope: 'nope')).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
describe 'when the value has an "object" type', ->
beforeEach ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
nestedObject:
type: 'object'
properties:
nestedBool:
type: 'boolean'
default: false
atom.config.setSchema('foo.bar', schema)
it 'converts and validates all the children', ->
atom.config.set 'foo.bar',
anInt: '23'
nestedObject:
nestedBool: 'true'
expect(atom.config.get('foo.bar')).toEqual
anInt: 23
nestedObject:
nestedBool: true
it 'will set only the values that adhere to the schema', ->
expect(atom.config.set 'foo.bar',
anInt: 'nope'
nestedObject:
nestedBool: true
).toBe true
expect(atom.config.get('foo.bar.anInt')).toEqual 12
expect(atom.config.get('foo.bar.nestedObject.nestedBool')).toEqual true
describe 'when the value has an "array" type', ->
beforeEach ->
schema =
type: 'array'
default: [1, 2, 3]
items:
type: 'integer'
atom.config.setSchema('foo.bar', schema)
it 'converts an array of strings to an array of ints', ->
atom.config.set 'foo.bar', ['2', '3', '4']
expect(atom.config.get('foo.bar')).toEqual [2, 3, 4]
describe 'when the `enum` key is used', ->
beforeEach ->
schema =
type: 'object'
properties:
str:
type: 'string'
default: 'ok'
enum: ['ok', 'one', 'two']
int:
type: 'integer'
default: 2
enum: [2, 3, 5]
arr:
type: 'array'
default: ['one', 'two']
items:
type: 'string'
enum: ['one', 'two', 'three']
atom.config.setSchema('foo.bar', schema)
it 'will only set a string when the string is in the enum values', ->
expect(atom.config.set('foo.bar.str', 'nope')).toBe false
expect(atom.config.get('foo.bar.str')).toBe 'ok'
expect(atom.config.set('foo.bar.str', 'one')).toBe true
expect(atom.config.get('foo.bar.str')).toBe 'one'
it 'will only set an integer when the integer is in the enum values', ->
expect(atom.config.set('foo.bar.int', '400')).toBe false
expect(atom.config.get('foo.bar.int')).toBe 2
expect(atom.config.set('foo.bar.int', '3')).toBe true
expect(atom.config.get('foo.bar.int')).toBe 3
it 'will only set an array when the array values are in the enum values', ->
expect(atom.config.set('foo.bar.arr', ['one', 'five'])).toBe true
expect(atom.config.get('foo.bar.arr')).toEqual ['one']
expect(atom.config.set('foo.bar.arr', ['two', 'three'])).toBe true
expect(atom.config.get('foo.bar.arr')).toEqual ['two', 'three']
+39 -1
Ver Arquivo
@@ -6,7 +6,8 @@ describe "ContextMenuManager", ->
[contextMenu] = []
beforeEach ->
contextMenu = new ContextMenuManager
{resourcePath} = atom.getLoadSettings()
contextMenu = new ContextMenuManager({resourcePath})
describe "adding definitions", ->
it 'loads', ->
@@ -17,6 +18,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':
+31 -20
Ver Arquivo
@@ -1,33 +1,44 @@
DeserializerManager = require '../src/deserializer-manager'
describe ".deserialize(state)", ->
deserializer = null
describe "DeserializerManager", ->
manager = null
class Foo
@deserialize: ({name}) -> new Foo(name)
constructor: (@name) ->
beforeEach ->
deserializer = new DeserializerManager()
deserializer.add(Foo)
manager = new DeserializerManager
it "calls deserialize on the deserializer for the given state object, or returns undefined if one can't be found", ->
spyOn(console, 'warn')
object = deserializer.deserialize({ deserializer: 'Foo', name: 'Bar' })
expect(object.name).toBe 'Bar'
expect(deserializer.deserialize({ deserializer: 'Bogus' })).toBeUndefined()
describe "::add(deserializer)", ->
it "returns a disposable that can be used to remove the manager", ->
disposable = manager.add(Foo)
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeDefined()
disposable.dispose()
spyOn(console, 'warn')
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeUndefined()
describe "when the deserializer has a version", ->
describe "::deserialize(state)", ->
beforeEach ->
Foo.version = 2
manager.add(Foo)
describe "when the deserialized state has a matching version", ->
it "attempts to deserialize the state", ->
object = deserializer.deserialize({ deserializer: 'Foo', version: 2, name: 'Bar' })
expect(object.name).toBe 'Bar'
it "calls deserialize on the manager for the given state object, or returns undefined if one can't be found", ->
spyOn(console, 'warn')
object = manager.deserialize({deserializer: 'Foo', name: 'Bar'})
expect(object.name).toBe 'Bar'
expect(manager.deserialize({deserializer: 'Bogus'})).toBeUndefined()
describe "when the deserialized state has a non-matching version", ->
it "returns undefined", ->
expect(deserializer.deserialize({ deserializer: 'Foo', version: 3, name: 'Bar' })).toBeUndefined()
expect(deserializer.deserialize({ deserializer: 'Foo', version: 1, name: 'Bar' })).toBeUndefined()
expect(deserializer.deserialize({ deserializer: 'Foo', name: 'Bar' })).toBeUndefined()
describe "when the manager has a version", ->
beforeEach ->
Foo.version = 2
describe "when the deserialized state has a matching version", ->
it "attempts to deserialize the state", ->
object = manager.deserialize({deserializer: 'Foo', version: 2, name: 'Bar'})
expect(object.name).toBe 'Bar'
describe "when the deserialized state has a non-matching version", ->
it "returns undefined", ->
expect(manager.deserialize({deserializer: 'Foo', version: 3, name: 'Bar'})).toBeUndefined()
expect(manager.deserialize({deserializer: 'Foo', version: 1, name: 'Bar'})).toBeUndefined()
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeUndefined()
+322 -127
Ver Arquivo
@@ -9,7 +9,7 @@ describe "DisplayBuffer", ->
buffer = atom.project.bufferForPathSync('sample.js')
displayBuffer = new DisplayBuffer({buffer, tabLength})
changeHandler = jasmine.createSpy 'changeHandler'
displayBuffer.on 'changed', changeHandler
displayBuffer.onDidChange changeHandler
waitsForPromise ->
atom.packages.activatePackage('language-javascript')
@@ -47,9 +47,18 @@ 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)
displayBuffer.setSoftWrapped(true)
displayBuffer.setEditorWidthInChars(50)
changeHandler.reset()
@@ -58,48 +67,48 @@ describe "DisplayBuffer", ->
it "uses the preferred line length as the soft wrap column when it is less than the configured soft wrap column", ->
atom.config.set('editor.preferredLineLength', 100)
atom.config.set('editor.softWrapAtPreferredLineLength', true)
expect(displayBuffer.lineForRow(10).text).toBe ' return '
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe ' return '
atom.config.set('editor.preferredLineLength', 5)
expect(displayBuffer.lineForRow(10).text).toBe 'funct'
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe 'funct'
atom.config.set('editor.softWrapAtPreferredLineLength', false)
expect(displayBuffer.lineForRow(10).text).toBe ' return '
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe ' return '
describe "when the line is shorter than the max line length", ->
it "renders the line unchanged", ->
expect(displayBuffer.lineForRow(0).text).toBe buffer.lineForRow(0)
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe buffer.lineForRow(0)
describe "when the line is empty", ->
it "renders the empty line", ->
expect(displayBuffer.lineForRow(13).text).toBe ''
expect(displayBuffer.tokenizedLineForScreenRow(13).text).toBe ''
describe "when there is a non-whitespace character at the max length boundary", ->
describe "when there is whitespace before the boundary", ->
it "wraps the line at the end of the first whitespace preceding the boundary", ->
expect(displayBuffer.lineForRow(10).text).toBe ' return '
expect(displayBuffer.lineForRow(11).text).toBe 'sort(left).concat(pivot).concat(sort(right));'
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe ' return '
expect(displayBuffer.tokenizedLineForScreenRow(11).text).toBe 'sort(left).concat(pivot).concat(sort(right));'
describe "when there is no whitespace before the boundary", ->
it "wraps the line exactly at the boundary since there's no more graceful place to wrap it", ->
buffer.setTextInRange([[0, 0], [1, 0]], 'abcdefghijklmnopqrstuvwxyz\n')
displayBuffer.setEditorWidthInChars(10)
expect(displayBuffer.lineForRow(0).text).toBe 'abcdefghij'
expect(displayBuffer.lineForRow(1).text).toBe 'klmnopqrst'
expect(displayBuffer.lineForRow(2).text).toBe 'uvwxyz'
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe 'abcdefghij'
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe 'klmnopqrst'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe 'uvwxyz'
describe "when there is a whitespace character at the max length boundary", ->
it "wraps the line at the first non-whitespace character following the boundary", ->
expect(displayBuffer.lineForRow(3).text).toBe ' var pivot = items.shift(), current, left = [], '
expect(displayBuffer.lineForRow(4).text).toBe 'right = [];'
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe ' var pivot = items.shift(), current, left = [], '
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toBe 'right = [];'
describe "when there are hard tabs", ->
beforeEach ->
buffer.setText(buffer.getText().replace(new RegExp(' ', 'g'), '\t'))
it "correctly tokenizes the hard tabs", ->
expect(displayBuffer.lineForRow(3).tokens[0].isHardTab).toBeTruthy()
expect(displayBuffer.lineForRow(3).tokens[1].isHardTab).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(3).tokens[0].isHardTab).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(3).tokens[1].isHardTab).toBeTruthy()
describe "when the buffer changes", ->
describe "when buffer lines are updated", ->
@@ -112,57 +121,57 @@ describe "DisplayBuffer", ->
describe "when the update makes a soft-wrapped line shorter than the max line length", ->
it "rewraps the line and emits a change event", ->
buffer.delete([[6, 24], [6, 42]])
expect(displayBuffer.lineForRow(7).text).toBe ' current < pivot ? : right.push(current);'
expect(displayBuffer.lineForRow(8).text).toBe ' }'
expect(displayBuffer.tokenizedLineForScreenRow(7).text).toBe ' current < pivot ? : right.push(current);'
expect(displayBuffer.tokenizedLineForScreenRow(8).text).toBe ' }'
expect(changeHandler).toHaveBeenCalled()
[[event]]= changeHandler.argsForCall
expect(event).toEqual(start: 7, end: 8, screenDelta: -1, bufferDelta: 0)
describe "when the update causes a line to softwrap an additional time", ->
describe "when the update causes a line to soft wrap an additional time", ->
it "rewraps the line and emits a change event", ->
buffer.insert([6, 28], '1234567890')
expect(displayBuffer.lineForRow(7).text).toBe ' current < pivot ? '
expect(displayBuffer.lineForRow(8).text).toBe 'left1234567890.push(current) : '
expect(displayBuffer.lineForRow(9).text).toBe 'right.push(current);'
expect(displayBuffer.lineForRow(10).text).toBe ' }'
expect(displayBuffer.tokenizedLineForScreenRow(7).text).toBe ' current < pivot ? '
expect(displayBuffer.tokenizedLineForScreenRow(8).text).toBe 'left1234567890.push(current) : '
expect(displayBuffer.tokenizedLineForScreenRow(9).text).toBe 'right.push(current);'
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe ' }'
expect(changeHandler).toHaveBeenCalledWith(start: 7, end: 8, screenDelta: 1, bufferDelta: 0)
describe "when buffer lines are inserted", ->
it "inserts / updates wrapped lines and emits a change event", ->
buffer.insert([6, 21], '1234567890 abcdefghij 1234567890\nabcdefghij')
expect(displayBuffer.lineForRow(7).text).toBe ' current < pivot1234567890 abcdefghij '
expect(displayBuffer.lineForRow(8).text).toBe '1234567890'
expect(displayBuffer.lineForRow(9).text).toBe 'abcdefghij ? left.push(current) : '
expect(displayBuffer.lineForRow(10).text).toBe 'right.push(current);'
expect(displayBuffer.tokenizedLineForScreenRow(7).text).toBe ' current < pivot1234567890 abcdefghij '
expect(displayBuffer.tokenizedLineForScreenRow(8).text).toBe '1234567890'
expect(displayBuffer.tokenizedLineForScreenRow(9).text).toBe 'abcdefghij ? left.push(current) : '
expect(displayBuffer.tokenizedLineForScreenRow(10).text).toBe 'right.push(current);'
expect(changeHandler).toHaveBeenCalledWith(start: 7, end: 8, screenDelta: 2, bufferDelta: 1)
describe "when buffer lines are removed", ->
it "removes lines and emits a change event", ->
buffer.setTextInRange([[3, 21], [7, 5]], ';')
expect(displayBuffer.lineForRow(3).text).toBe ' var pivot = items;'
expect(displayBuffer.lineForRow(4).text).toBe ' return '
expect(displayBuffer.lineForRow(5).text).toBe 'sort(left).concat(pivot).concat(sort(right));'
expect(displayBuffer.lineForRow(6).text).toBe ' };'
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe ' var pivot = items;'
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toBe ' return '
expect(displayBuffer.tokenizedLineForScreenRow(5).text).toBe 'sort(left).concat(pivot).concat(sort(right));'
expect(displayBuffer.tokenizedLineForScreenRow(6).text).toBe ' };'
expect(changeHandler).toHaveBeenCalledWith(start: 3, end: 9, screenDelta: -6, bufferDelta: -4)
describe "when a newline is inserted, deleted, and re-inserted at the end of a wrapped line (regression)", ->
it "correctly renders the original wrapped line", ->
buffer = atom.project.buildBufferSync(null, '')
displayBuffer = new DisplayBuffer({buffer, tabLength, editorWidthInChars: 30, softWrap: true})
displayBuffer = new DisplayBuffer({buffer, tabLength, editorWidthInChars: 30, softWrapped: true})
buffer.insert([0, 0], "the quick brown fox jumps over the lazy dog.")
buffer.insert([0, Infinity], '\n')
buffer.delete([[0, Infinity], [1, 0]])
buffer.insert([0, Infinity], '\n')
expect(displayBuffer.lineForRow(0).text).toBe "the quick brown fox jumps over "
expect(displayBuffer.lineForRow(1).text).toBe "the lazy dog."
expect(displayBuffer.lineForRow(2).text).toBe ""
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe "the quick brown fox jumps over "
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "the lazy dog."
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe ""
describe "position translation", ->
it "translates positions accounting for wrapped lines", ->
@@ -195,9 +204,9 @@ describe "DisplayBuffer", ->
describe ".setEditorWidthInChars(length)", ->
it "changes the length at which lines are wrapped and emits a change event for all screen lines", ->
displayBuffer.setEditorWidthInChars(40)
expect(tokensText displayBuffer.lineForRow(4).tokens).toBe 'left = [], right = [];'
expect(tokensText displayBuffer.lineForRow(5).tokens).toBe ' while(items.length > 0) {'
expect(tokensText displayBuffer.lineForRow(12).tokens).toBe 'sort(left).concat(pivot).concat(sort(rig'
expect(tokensText displayBuffer.tokenizedLineForScreenRow(4).tokens).toBe 'left = [], right = [];'
expect(tokensText displayBuffer.tokenizedLineForScreenRow(5).tokens).toBe ' while(items.length > 0) {'
expect(tokensText displayBuffer.tokenizedLineForScreenRow(12).tokens).toBe 'sort(left).concat(pivot).concat(sort(rig'
expect(changeHandler).toHaveBeenCalledWith(start: 0, end: 15, screenDelta: 3, bufferDelta: 0)
it "only allows positive widths to be assigned", ->
@@ -206,13 +215,26 @@ 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.setSoftWrapped(false)
displayBuffer.setScrollLeft(Infinity)
expect(displayBuffer.getScrollLeft()).toBeGreaterThan 0
displayBuffer.setSoftWrapped(true)
expect(displayBuffer.getScrollLeft()).toBe 0
displayBuffer.setScrollLeft(10)
expect(displayBuffer.getScrollLeft()).toBe 0
describe "primitive folding", ->
beforeEach ->
displayBuffer.destroy()
buffer.release()
buffer = atom.project.bufferForPathSync('two-hundred.txt')
displayBuffer = new DisplayBuffer({buffer, tabLength})
displayBuffer.on 'changed', changeHandler
displayBuffer.onDidChange changeHandler
describe "when folds are created and destroyed", ->
describe "when a fold spans multiple lines", ->
@@ -220,7 +242,7 @@ describe "DisplayBuffer", ->
fold = displayBuffer.createFold(4, 7)
expect(fold).toBeDefined()
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBe fold
expect(line4.text).toMatch /^4-+/
expect(line5.text).toBe '8'
@@ -229,7 +251,7 @@ describe "DisplayBuffer", ->
changeHandler.reset()
fold.destroy()
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBeUndefined()
expect(line4.text).toMatch /^4-+/
expect(line5.text).toBe '5'
@@ -240,7 +262,7 @@ describe "DisplayBuffer", ->
it "renders a fold placeholder for the folded line but does not skip any lines", ->
fold = displayBuffer.createFold(4, 4)
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBe fold
expect(line4.text).toMatch /^4-+/
expect(line5.text).toBe '5'
@@ -253,7 +275,7 @@ describe "DisplayBuffer", ->
fold.destroy()
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBeUndefined()
expect(line4.text).toMatch /^4-+/
expect(line5.text).toBe '5'
@@ -265,13 +287,13 @@ describe "DisplayBuffer", ->
innerFold = displayBuffer.createFold(6, 7)
outerFold = displayBuffer.createFold(4, 8)
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBe outerFold
expect(line4.text).toMatch /4-+/
expect(line5.text).toMatch /9-+/
outerFold.destroy()
[line4, line5, line6, line7] = displayBuffer.linesForRows(4, 7)
[line4, line5, line6, line7] = displayBuffer.tokenizedLinesForScreenRows(4, 7)
expect(line4.fold).toBeUndefined()
expect(line4.text).toMatch /^4-+/
expect(line5.text).toBe '5'
@@ -283,7 +305,7 @@ describe "DisplayBuffer", ->
innerFold = displayBuffer.createFold(4, 6)
outerFold = displayBuffer.createFold(4, 8)
[line4, line5] = displayBuffer.linesForRows(4, 5)
[line4, line5] = displayBuffer.tokenizedLinesForScreenRows(4, 5)
expect(line4.fold).toBe outerFold
expect(line4.text).toMatch /4-+/
expect(line5.text).toMatch /9-+/
@@ -304,17 +326,25 @@ describe "DisplayBuffer", ->
innerFold = displayBuffer.createFold(2, 5)
expect(changeHandler).not.toHaveBeenCalled()
[line0, line1] = displayBuffer.linesForRows(0, 1)
[line0, line1] = displayBuffer.tokenizedLinesForScreenRows(0, 1)
expect(line0.fold).toBe outerFold
expect(line1.fold).toBeUndefined()
changeHandler.reset()
innerFold.destroy()
expect(changeHandler).not.toHaveBeenCalled()
[line0, line1] = displayBuffer.linesForRows(0, 1)
[line0, line1] = displayBuffer.tokenizedLinesForScreenRows(0, 1)
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.tokenizedLineForScreenRow(0).text).toMatch /^0/
expect(displayBuffer.tokenizedLineForScreenRow(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})
@@ -333,19 +363,19 @@ describe "DisplayBuffer", ->
buffer.setTextInRange([[1, 0], [5, 1]], 'party!')
it "removes the fold and replaces the selection with the new text", ->
expect(displayBuffer.lineForRow(0).text).toBe "0"
expect(displayBuffer.lineForRow(1).text).toBe "party!"
expect(displayBuffer.lineForRow(2).fold).toBe fold2
expect(displayBuffer.lineForRow(3).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe "0"
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "party!"
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 1, end: 3, screenDelta: -2, bufferDelta: -4)
describe "when the changes is subsequently undone", ->
xit "restores destroyed folds", ->
buffer.undo()
expect(displayBuffer.lineForRow(2).text).toBe '2'
expect(displayBuffer.lineForRow(2).fold).toBe fold1
expect(displayBuffer.lineForRow(3).text).toBe '5'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe '2'
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe '5'
describe "when the old range surrounds two nested folds", ->
it "removes both folds and replaces the selection with the new text", ->
@@ -354,9 +384,9 @@ describe "DisplayBuffer", ->
buffer.setTextInRange([[1, 0], [10, 0]], 'goodbye')
expect(displayBuffer.lineForRow(0).text).toBe "0"
expect(displayBuffer.lineForRow(1).text).toBe "goodbye10"
expect(displayBuffer.lineForRow(2).text).toBe "11"
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe "0"
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "goodbye10"
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe "11"
expect(changeHandler).toHaveBeenCalledWith(start: 1, end: 3, screenDelta: -2, bufferDelta: -9)
@@ -373,42 +403,42 @@ describe "DisplayBuffer", ->
it "updates the buffer and re-positions subsequent folds", ->
buffer.setTextInRange([[0, 0], [1, 1]], 'abc')
expect(displayBuffer.lineForRow(0).text).toBe "abc"
expect(displayBuffer.lineForRow(1).fold).toBe fold1
expect(displayBuffer.lineForRow(2).text).toBe "5"
expect(displayBuffer.lineForRow(3).fold).toBe fold2
expect(displayBuffer.lineForRow(4).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe "abc"
expect(displayBuffer.tokenizedLineForScreenRow(1).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe "5"
expect(displayBuffer.tokenizedLineForScreenRow(3).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 0, end: 1, screenDelta: -1, bufferDelta: -1)
changeHandler.reset()
fold1.destroy()
expect(displayBuffer.lineForRow(0).text).toBe "abc"
expect(displayBuffer.lineForRow(1).text).toBe "2"
expect(displayBuffer.lineForRow(3).text).toMatch /^4-+/
expect(displayBuffer.lineForRow(4).text).toBe "5"
expect(displayBuffer.lineForRow(5).fold).toBe fold2
expect(displayBuffer.lineForRow(6).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(0).text).toBe "abc"
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "2"
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toMatch /^4-+/
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toBe "5"
expect(displayBuffer.tokenizedLineForScreenRow(5).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(6).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 1, end: 1, screenDelta: 2, bufferDelta: 0)
describe "when the old range straddles the beginning of a fold", ->
it "destroys the fold", ->
buffer.setTextInRange([[1, 1], [3, 0]], "a\nb\nc\nd\n")
expect(displayBuffer.lineForRow(1).text).toBe '1a'
expect(displayBuffer.lineForRow(2).text).toBe 'b'
expect(displayBuffer.lineForRow(2).fold).toBeUndefined()
expect(displayBuffer.lineForRow(3).text).toBe 'c'
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe '1a'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe 'b'
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBeUndefined()
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe 'c'
describe "when the old range follows a fold", ->
it "re-positions the screen ranges for the change event based on the preceding fold", ->
buffer.setTextInRange([[10, 0], [11, 0]], 'abc')
expect(displayBuffer.lineForRow(1).text).toBe "1"
expect(displayBuffer.lineForRow(2).fold).toBe fold1
expect(displayBuffer.lineForRow(3).text).toBe "5"
expect(displayBuffer.lineForRow(4).fold).toBe fold2
expect(displayBuffer.lineForRow(5).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "1"
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe "5"
expect(displayBuffer.tokenizedLineForScreenRow(4).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(5).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 6, end: 7, screenDelta: -1, bufferDelta: -1)
@@ -419,12 +449,12 @@ describe "DisplayBuffer", ->
expect(fold1.getStartRow()).toBe 2
expect(fold1.getEndRow()).toBe 5
expect(displayBuffer.lineForRow(1).text).toBe "1"
expect(displayBuffer.lineForRow(2).text).toBe "2"
expect(displayBuffer.lineForRow(2).fold).toBe fold1
expect(displayBuffer.lineForRow(3).text).toMatch "5"
expect(displayBuffer.lineForRow(4).fold).toBe fold2
expect(displayBuffer.lineForRow(5).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "1"
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe "2"
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toMatch "5"
expect(displayBuffer.tokenizedLineForScreenRow(4).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(5).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 2, end: 2, screenDelta: 0, bufferDelta: 1)
@@ -434,12 +464,12 @@ describe "DisplayBuffer", ->
expect(fold1.getStartRow()).toBe 2
expect(fold1.getEndRow()).toBe 7
expect(displayBuffer.lineForRow(1).text).toBe "1"
expect(displayBuffer.lineForRow(2).text).toBe "2"
expect(displayBuffer.lineForRow(2).fold).toBe fold1
expect(displayBuffer.lineForRow(3).text).toMatch "5"
expect(displayBuffer.lineForRow(4).fold).toBe fold2
expect(displayBuffer.lineForRow(5).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "1"
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe "2"
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toMatch "5"
expect(displayBuffer.tokenizedLineForScreenRow(4).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(5).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 2, end: 2, screenDelta: 0, bufferDelta: 3)
@@ -448,21 +478,21 @@ describe "DisplayBuffer", ->
it "destroys the fold", ->
fold2.destroy()
buffer.setTextInRange([[3, 0], [6, 0]], 'a\n')
expect(displayBuffer.lineForRow(2).text).toBe '2'
expect(displayBuffer.lineForRow(2).fold).toBeUndefined()
expect(displayBuffer.lineForRow(3).text).toBe 'a'
expect(displayBuffer.lineForRow(4).text).toBe '6'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe '2'
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBeUndefined()
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toBe 'a'
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toBe '6'
describe "when the old range is contained to a single line in-between two folds", ->
it "re-renders the line with the placeholder and re-positions the second fold", ->
buffer.insert([5, 0], 'abc\n')
expect(displayBuffer.lineForRow(1).text).toBe "1"
expect(displayBuffer.lineForRow(2).fold).toBe fold1
expect(displayBuffer.lineForRow(3).text).toMatch "abc"
expect(displayBuffer.lineForRow(4).text).toBe "5"
expect(displayBuffer.lineForRow(5).fold).toBe fold2
expect(displayBuffer.lineForRow(6).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe "1"
expect(displayBuffer.tokenizedLineForScreenRow(2).fold).toBe fold1
expect(displayBuffer.tokenizedLineForScreenRow(3).text).toMatch "abc"
expect(displayBuffer.tokenizedLineForScreenRow(4).text).toBe "5"
expect(displayBuffer.tokenizedLineForScreenRow(5).fold).toBe fold2
expect(displayBuffer.tokenizedLineForScreenRow(6).text).toMatch /^9-+/
expect(changeHandler).toHaveBeenCalledWith(start: 3, end: 3, screenDelta: 1, bufferDelta: 1)
@@ -515,15 +545,15 @@ describe "DisplayBuffer", ->
displayBuffer.createFold(1, 9)
displayBuffer.createFold(11, 12)
expect(displayBuffer.lineForRow(1).text).toBe '1'
expect(displayBuffer.lineForRow(2).text).toBe '10'
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe '1'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe '10'
displayBuffer.unfoldBufferRow(2)
expect(displayBuffer.lineForRow(1).text).toBe '1'
expect(displayBuffer.lineForRow(2).text).toBe '2'
expect(displayBuffer.lineForRow(7).fold).toBeDefined()
expect(displayBuffer.lineForRow(8).text).toMatch /^9-+/
expect(displayBuffer.lineForRow(10).fold).toBeDefined()
expect(displayBuffer.tokenizedLineForScreenRow(1).text).toBe '1'
expect(displayBuffer.tokenizedLineForScreenRow(2).text).toBe '2'
expect(displayBuffer.tokenizedLineForScreenRow(7).fold).toBeDefined()
expect(displayBuffer.tokenizedLineForScreenRow(8).text).toMatch /^9-+/
expect(displayBuffer.tokenizedLineForScreenRow(10).fold).toBeDefined()
describe ".outermostFoldsInBufferRowRange(startRow, endRow)", ->
it "returns the outermost folds entirely contained in the given row range, exclusive of end row", ->
@@ -538,7 +568,7 @@ describe "DisplayBuffer", ->
describe "::clipScreenPosition(screenPosition, wrapBeyondNewlines: false, wrapAtSoftNewlines: false, skipAtomicTokens: false)", ->
beforeEach ->
displayBuffer.setSoftWrap(true)
displayBuffer.setSoftWrapped(true)
displayBuffer.setEditorWidthInChars(50)
it "allows valid positions", ->
@@ -613,7 +643,7 @@ describe "DisplayBuffer", ->
it "correctly translates positions on soft wrapped lines containing tabs", ->
buffer.setText('\t\taa bb cc dd ee ff gg')
displayBuffer.setSoftWrap(true)
displayBuffer.setSoftWrapped(true)
displayBuffer.setEditorWidthInChars(10)
expect(displayBuffer.screenPositionForBufferPosition([0, 10], wrapAtSoftNewlines: true)).toEqual [1, 0]
expect(displayBuffer.bufferPositionForScreenPosition([1, 0])).toEqual [0, 10]
@@ -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])
@@ -643,7 +686,7 @@ describe "DisplayBuffer", ->
expect(marker2.getScreenRange()).toEqual [[5, 4], [5, 10]]
it "emits a 'marker-created' event on the DisplayBuffer whenever a marker is created", ->
displayBuffer.on 'marker-created', markerCreatedHandler = jasmine.createSpy("markerCreatedHandler")
displayBuffer.onDidCreateMarker markerCreatedHandler = jasmine.createSpy("markerCreatedHandler")
marker1 = displayBuffer.markScreenRange([[5, 4], [5, 10]])
expect(markerCreatedHandler).toHaveBeenCalledWith(marker1)
@@ -679,7 +722,7 @@ describe "DisplayBuffer", ->
beforeEach ->
marker = displayBuffer.markScreenRange([[5, 4], [5, 10]])
marker.on 'changed', markerChangedHandler = jasmine.createSpy("markerChangedHandler")
marker.onDidChange markerChangedHandler = jasmine.createSpy("markerChangedHandler")
it "triggers the 'changed' event whenever the markers head's screen position changes in the buffer or on screen", ->
marker.setHeadScreenPosition([8, 20])
@@ -816,8 +859,8 @@ describe "DisplayBuffer", ->
it "updates markers before emitting buffer change events, but does not notify their observers until the change event", ->
marker2 = displayBuffer.markBufferRange([[8, 1], [8, 1]])
marker2.on 'changed', marker2ChangedHandler = jasmine.createSpy("marker2ChangedHandler")
displayBuffer.on 'changed', changeHandler = jasmine.createSpy("changeHandler").andCallFake -> onDisplayBufferChange()
marker2.onDidChange marker2ChangedHandler = jasmine.createSpy("marker2ChangedHandler")
displayBuffer.onDidChange changeHandler = jasmine.createSpy("changeHandler").andCallFake -> onDisplayBufferChange()
# New change ----
@@ -843,7 +886,7 @@ describe "DisplayBuffer", ->
marker2ChangedHandler.reset()
marker3 = displayBuffer.markBufferRange([[8, 1], [8, 2]])
marker3.on 'changed', marker3ChangedHandler = jasmine.createSpy("marker3ChangedHandler")
marker3.onDidChange marker3ChangedHandler = jasmine.createSpy("marker3ChangedHandler")
onDisplayBufferChange = ->
# calls change handler first
@@ -889,7 +932,7 @@ describe "DisplayBuffer", ->
expect(marker3ChangedHandler).toHaveBeenCalled()
it "updates the position of markers before emitting change events that aren't caused by a buffer change", ->
displayBuffer.on 'changed', changeHandler = jasmine.createSpy("changeHandler").andCallFake ->
displayBuffer.onDidChange changeHandler = jasmine.createSpy("changeHandler").andCallFake ->
# calls change handler first
expect(markerChangedHandler).not.toHaveBeenCalled()
# but still updates the markers
@@ -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]])
@@ -919,20 +998,20 @@ describe "DisplayBuffer", ->
expect(marker.isValid()).toBeFalsy()
expect(displayBuffer.getMarker(marker.id)).toBeUndefined()
it "emits 'destroyed' events when markers are destroyed", ->
it "notifies ::onDidDestroy observers when markers are destroyed", ->
destroyedHandler = jasmine.createSpy("destroyedHandler")
marker = displayBuffer.markScreenRange([[5, 4], [5, 10]])
marker.on 'destroyed', destroyedHandler
marker.onDidDestroy destroyedHandler
marker.destroy()
expect(destroyedHandler).toHaveBeenCalled()
destroyedHandler.reset()
marker2 = displayBuffer.markScreenRange([[5, 4], [5, 10]])
marker2.on 'destroyed', destroyedHandler
marker2.onDidDestroy destroyedHandler
buffer.getMarker(marker2.id).destroy()
expect(destroyedHandler).toHaveBeenCalled()
describe "DisplayBufferMarker::copy(attributes)", ->
describe "Marker::copy(attributes)", ->
it "creates a copy of the marker with the given attributes merged in", ->
initialMarkerCount = displayBuffer.getMarkerCount()
marker1 = displayBuffer.markScreenRange([[5, 4], [5, 10]], a: 1, b: 2)
@@ -941,21 +1020,66 @@ describe "DisplayBuffer", ->
marker2 = marker1.copy(b: 3)
expect(marker2.getBufferRange()).toEqual marker1.getBufferRange()
expect(displayBuffer.getMarkerCount()).toBe initialMarkerCount + 2
expect(marker1.getAttributes()).toEqual a: 1, b: 2
expect(marker2.getAttributes()).toEqual a: 1, b: 3
expect(marker1.getProperties()).toEqual a: 1, b: 2
expect(marker2.getProperties()).toEqual a: 1, b: 3
describe "DisplayBufferMarker::getPixelRange()", ->
describe "Marker::getPixelRange()", ->
it "returns the start and end positions of the marker based on the line height and character widths assigned to the DisplayBuffer", ->
marker = displayBuffer.markScreenRange([[5, 10], [6, 4]])
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 'when there are multiple DisplayBuffers for a buffer', ->
describe 'when a marker is created', ->
it 'the second display buffer will not emit a marker-created event when the marker has been deleted in the first marker-created event', ->
displayBuffer2 = new DisplayBuffer({buffer, tabLength})
displayBuffer.onDidCreateMarker markerCreated1 = jasmine.createSpy().andCallFake (marker) -> marker.destroy()
displayBuffer2.onDidCreateMarker markerCreated2 = jasmine.createSpy()
displayBuffer.markBufferRange([[0, 0], [1, 5]], {})
expect(markerCreated1).toHaveBeenCalled()
expect(markerCreated2).not.toHaveBeenCalled()
describe "decorations", ->
[marker, decoration, decorationProperties] = []
beforeEach ->
marker = displayBuffer.markBufferRange([[2, 13], [3, 15]])
decorationProperties = {type: 'gutter', class: 'one'}
decoration = displayBuffer.decorateMarker(marker, decorationProperties)
it "can add decorations associated with markers and remove them", ->
expect(decoration).toBeDefined()
expect(decoration.getProperties()).toBe decorationProperties
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.onDidChangeProperties updatedSpy = jasmine.createSpy()
decoration.setProperties type: 'gutter', class: 'two'
{oldProperties, newProperties} = updatedSpy.mostRecentCall.args[0]
expect(oldProperties).toEqual decorationProperties
expect(newProperties).toEqual type: 'gutter', class: 'two', id: decoration.id
describe "::setScrollTop", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
@@ -976,6 +1100,33 @@ describe "DisplayBuffer", ->
expect(displayBuffer.setScrollTop(maxScrollTop + 50)).toBe maxScrollTop
expect(displayBuffer.getScrollTop()).toBe maxScrollTop
describe "editor.scrollPastEnd", ->
describe "when editor.scrollPastEnd is false", ->
beforeEach ->
atom.config.set("editor.scrollPastEnd", false)
displayBuffer.manageScrollPosition = true
displayBuffer.setLineHeightInPixels(10)
it "does not add the height of the view to the scroll height", ->
lineHeight = displayBuffer.getLineHeightInPixels()
originalScrollHeight = displayBuffer.getScrollHeight()
displayBuffer.setHeight(50)
expect(displayBuffer.getScrollHeight()).toBe originalScrollHeight
describe "when editor.scrollPastEnd is true", ->
beforeEach ->
atom.config.set("editor.scrollPastEnd", true)
displayBuffer.manageScrollPosition = true
displayBuffer.setLineHeightInPixels(10)
it "adds the height of the view to the scroll height", ->
lineHeight = displayBuffer.getLineHeightInPixels()
originalScrollHeight = displayBuffer.getScrollHeight()
displayBuffer.setHeight(50)
expect(displayBuffer.getScrollHeight()).toEqual(originalScrollHeight + displayBuffer.height - (lineHeight * 3))
describe "::setScrollLeft", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
@@ -997,17 +1148,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.onDidChangeCharacterWidths 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
-942
Ver Arquivo
@@ -1,942 +0,0 @@
_ = require 'underscore-plus'
{extend, flatten, toArray, last} = _
ReactEditorView = require '../src/react-editor-view'
nbsp = String.fromCharCode(160)
describe "EditorComponent", ->
[contentNode, editor, wrapperView, component, node, verticalScrollbarNode, horizontalScrollbarNode] = []
[lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame, lineOverdrawMargin] = []
beforeEach ->
lineOverdrawMargin = 2
waitsForPromise ->
atom.packages.activatePackage('language-javascript')
runs ->
spyOn(window, "setInterval").andCallFake window.fakeSetInterval
spyOn(window, "clearInterval").andCallFake window.fakeClearInterval
delayAnimationFrames = false
nextAnimationFrame = null
spyOn(window, 'requestAnimationFrame').andCallFake (fn) ->
if delayAnimationFrames
nextAnimationFrame = fn
else
fn()
waitsForPromise ->
atom.project.open('sample.js').then (o) -> editor = o
runs ->
contentNode = document.querySelector('#jasmine-content')
contentNode.style.width = '1000px'
wrapperView = new ReactEditorView(editor, {lineOverdrawMargin})
wrapperView.attachToDom()
{component} = wrapperView
component.setLineHeight(1.3)
component.setFontSize(20)
lineHeightInPixels = editor.getLineHeightInPixels()
charWidth = editor.getDefaultCharWidth()
node = component.getDOMNode()
verticalScrollbarNode = node.querySelector('.vertical-scrollbar')
horizontalScrollbarNode = node.querySelector('.horizontal-scrollbar')
node.style.height = editor.getLineCount() * lineHeightInPixels + 'px'
node.style.width = '1000px'
component.measureScrollView()
afterEach ->
contentNode.style.width = ''
describe "line rendering", ->
it "renders the currently-visible lines plus the overdraw margin", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
component.measureScrollView()
linesNode = node.querySelector('.lines')
expect(linesNode.style['-webkit-transform']).toBe "translate3d(0px, 0px, 0px)"
expect(node.querySelectorAll('.line').length).toBe 6 + 2 # no margin above
expect(component.lineNodeForScreenRow(0).textContent).toBe editor.lineForScreenRow(0).text
expect(component.lineNodeForScreenRow(0).offsetTop).toBe 0
expect(component.lineNodeForScreenRow(5).textContent).toBe editor.lineForScreenRow(5).text
expect(component.lineNodeForScreenRow(5).offsetTop).toBe 5 * lineHeightInPixels
verticalScrollbarNode.scrollTop = 4.5 * lineHeightInPixels
verticalScrollbarNode.dispatchEvent(new UIEvent('scroll'))
expect(linesNode.style['-webkit-transform']).toBe "translate3d(0px, #{-4.5 * lineHeightInPixels}px, 0px)"
expect(node.querySelectorAll('.line').length).toBe 6 + 4 # margin above and below
expect(component.lineNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
expect(component.lineNodeForScreenRow(2).textContent).toBe editor.lineForScreenRow(2).text
expect(component.lineNodeForScreenRow(9).offsetTop).toBe 9 * lineHeightInPixels
expect(component.lineNodeForScreenRow(9).textContent).toBe editor.lineForScreenRow(9).text
it "updates the top position of subsequent lines when lines are inserted or removed", ->
editor.getBuffer().deleteRows(0, 1)
lineNodes = node.querySelectorAll('.line')
expect(component.lineNodeForScreenRow(0).offsetTop).toBe 0
expect(component.lineNodeForScreenRow(1).offsetTop).toBe 1 * lineHeightInPixels
expect(component.lineNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
editor.getBuffer().insert([0, 0], '\n\n')
lineNodes = node.querySelectorAll('.line')
expect(component.lineNodeForScreenRow(0).offsetTop).toBe 0 * lineHeightInPixels
expect(component.lineNodeForScreenRow(1).offsetTop).toBe 1 * lineHeightInPixels
expect(component.lineNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
expect(component.lineNodeForScreenRow(3).offsetTop).toBe 3 * lineHeightInPixels
expect(component.lineNodeForScreenRow(4).offsetTop).toBe 4 * lineHeightInPixels
it "updates the top position of lines when the line height changes", ->
initialLineHeightInPixels = editor.getLineHeightInPixels()
component.setLineHeight(2)
newLineHeightInPixels = editor.getLineHeightInPixels()
expect(newLineHeightInPixels).not.toBe initialLineHeightInPixels
expect(component.lineNodeForScreenRow(1).offsetTop).toBe 1 * newLineHeightInPixels
it "updates the top position of lines when the font size changes", ->
initialLineHeightInPixels = editor.getLineHeightInPixels()
component.setFontSize(10)
newLineHeightInPixels = editor.getLineHeightInPixels()
expect(newLineHeightInPixels).not.toBe initialLineHeightInPixels
expect(component.lineNodeForScreenRow(1).offsetTop).toBe 1 * newLineHeightInPixels
it "updates the top position of lines when the font family changes", ->
# Can't find a font that changes the line height, but we think one might exist
linesComponent = component.refs.lines
spyOn(linesComponent, 'measureLineHeightAndDefaultCharWidth').andCallFake -> editor.setLineHeightInPixels(10)
initialLineHeightInPixels = editor.getLineHeightInPixels()
component.setFontFamily('sans-serif')
expect(linesComponent.measureLineHeightAndDefaultCharWidth).toHaveBeenCalled()
newLineHeightInPixels = editor.getLineHeightInPixels()
expect(newLineHeightInPixels).not.toBe initialLineHeightInPixels
expect(component.lineNodeForScreenRow(1).offsetTop).toBe 1 * newLineHeightInPixels
it "renders the .lines div at the full height of the editor if there aren't enough lines to scroll vertically", ->
editor.setText('')
node.style.height = '300px'
component.measureScrollView()
linesNode = node.querySelector('.lines')
expect(linesNode.offsetHeight).toBe 300
describe "when showInvisibles is enabled", ->
invisibles = null
beforeEach ->
invisibles =
eol: 'E'
space: 'S'
tab: 'T'
cr: 'C'
atom.config.set("editor.showInvisibles", true)
atom.config.set("editor.invisibles", invisibles)
it "re-renders the lines when the showInvisibles config option changes", ->
editor.setText " a line with tabs\tand spaces "
expect(component.lineNodeForScreenRow(0).textContent).toBe "#{invisibles.space}a line with tabs#{invisibles.tab} and spaces#{invisibles.space}#{invisibles.eol}"
atom.config.set("editor.showInvisibles", false)
expect(component.lineNodeForScreenRow(0).textContent).toBe " a line with tabs and spaces "
atom.config.set("editor.showInvisibles", true)
expect(component.lineNodeForScreenRow(0).textContent).toBe "#{invisibles.space}a line with tabs#{invisibles.tab} and spaces#{invisibles.space}#{invisibles.eol}"
it "displays spaces, tabs, and newlines as visible characters", ->
editor.setText " a line with tabs\tand spaces "
expect(component.lineNodeForScreenRow(0).textContent).toBe "#{invisibles.space}a line with tabs#{invisibles.tab} and spaces#{invisibles.space}#{invisibles.eol}"
it "displays newlines as their own token outside of the other tokens' scopes", ->
editor.setText "var"
expect(component.lineNodeForScreenRow(0).innerHTML).toBe "<span class=\"source js\"><span class=\"storage modifier js\">var</span></span><span class=\"invisible-character\">#{invisibles.eol}</span>"
it "displays trailing carriage returns using a visible, non-empty value", ->
editor.setText "a line that ends with a carriage return\r\n"
expect(component.lineNodeForScreenRow(0).textContent).toBe "a line that ends with a carriage return#{invisibles.cr}#{invisibles.eol}"
describe "when soft wrapping is enabled", ->
beforeEach ->
editor.setText "a line that wraps "
editor.setSoftWrap(true)
node.style.width = 15 * charWidth + 'px'
component.measureScrollView()
it "doesn't show end of line invisibles at the end of wrapped lines", ->
expect(component.lineNodeForScreenRow(0).textContent).toBe "a line that "
expect(component.lineNodeForScreenRow(1).textContent).toBe "wraps#{invisibles.space}#{invisibles.eol}"
describe "when indent guides are enabled", ->
beforeEach ->
component.setShowIndentGuide(true)
it "adds an 'indent-guide' class to spans comprising the leading whitespace", ->
line1LeafNodes = getLeafNodes(component.lineNodeForScreenRow(1))
expect(line1LeafNodes[0].textContent).toBe ' '
expect(line1LeafNodes[0].classList.contains('indent-guide')).toBe true
expect(line1LeafNodes[1].classList.contains('indent-guide')).toBe false
line2LeafNodes = getLeafNodes(component.lineNodeForScreenRow(2))
expect(line2LeafNodes[0].textContent).toBe ' '
expect(line2LeafNodes[0].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[1].textContent).toBe ' '
expect(line2LeafNodes[1].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[2].classList.contains('indent-guide')).toBe false
it "renders leading whitespace spans with the 'indent-guide' class for empty lines", ->
editor.getBuffer().insert([1, Infinity], '\n')
line2LeafNodes = getLeafNodes(component.lineNodeForScreenRow(2))
expect(line2LeafNodes.length).toBe 3
expect(line2LeafNodes[0].textContent).toBe ' '
expect(line2LeafNodes[0].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[1].textContent).toBe ' '
expect(line2LeafNodes[1].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[2].textContent).toBe ' '
expect(line2LeafNodes[2].classList.contains('indent-guide')).toBe true
it "renders indent guides correctly on lines containing only whitespace", ->
editor.getBuffer().insert([1, Infinity], '\n ')
line2LeafNodes = getLeafNodes(component.lineNodeForScreenRow(2))
expect(line2LeafNodes.length).toBe 3
expect(line2LeafNodes[0].textContent).toBe ' '
expect(line2LeafNodes[0].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[1].textContent).toBe ' '
expect(line2LeafNodes[1].classList.contains('indent-guide')).toBe true
expect(line2LeafNodes[2].textContent).toBe ' '
expect(line2LeafNodes[2].classList.contains('indent-guide')).toBe true
it "does not render indent guides in trailing whitespace for lines containing non whitespace characters", ->
editor.getBuffer().setText " hi "
line0LeafNodes = getLeafNodes(component.lineNodeForScreenRow(0))
expect(line0LeafNodes[0].textContent).toBe ' '
expect(line0LeafNodes[0].classList.contains('indent-guide')).toBe true
expect(line0LeafNodes[1].textContent).toBe ' '
expect(line0LeafNodes[1].classList.contains('indent-guide')).toBe false
getLeafNodes = (node) ->
if node.children.length > 0
flatten(toArray(node.children).map(getLeafNodes))
else
[node]
describe "gutter rendering", ->
it "renders the currently-visible line numbers", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
component.measureScrollView()
expect(node.querySelectorAll('.line-number').length).toBe 6 + 2 + 1 # line overdraw margin below + dummy line number
expect(component.lineNumberNodeForScreenRow(0).textContent).toBe "#{nbsp}1"
expect(component.lineNumberNodeForScreenRow(5).textContent).toBe "#{nbsp}6"
verticalScrollbarNode.scrollTop = 2.5 * lineHeightInPixels
verticalScrollbarNode.dispatchEvent(new UIEvent('scroll'))
expect(node.querySelectorAll('.line-number').length).toBe 6 + 4 + 1 # line overdraw margin above/below + dummy line number
expect(component.lineNumberNodeForScreenRow(2).textContent).toBe "#{nbsp}3"
expect(component.lineNumberNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
return
expect(component.lineNumberNodeForScreenRow(7).textContent).toBe "#{nbsp}8"
expect(component.lineNumberNodeForScreenRow(7).offsetTop).toBe 7 * lineHeightInPixels
it "updates the translation of subsequent line numbers when lines are inserted or removed", ->
editor.getBuffer().insert([0, 0], '\n\n')
lineNumberNodes = node.querySelectorAll('.line-number')
expect(component.lineNumberNodeForScreenRow(0).offsetTop).toBe 0
expect(component.lineNumberNodeForScreenRow(1).offsetTop).toBe 1 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(3).offsetTop).toBe 3 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(4).offsetTop).toBe 4 * lineHeightInPixels
editor.getBuffer().insert([0, 0], '\n\n')
expect(component.lineNumberNodeForScreenRow(0).offsetTop).toBe 0
expect(component.lineNumberNodeForScreenRow(1).offsetTop).toBe 1 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(2).offsetTop).toBe 2 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(3).offsetTop).toBe 3 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(4).offsetTop).toBe 4 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(5).offsetTop).toBe 5 * lineHeightInPixels
expect(component.lineNumberNodeForScreenRow(6).offsetTop).toBe 6 * lineHeightInPixels
it "renders • characters for soft-wrapped lines", ->
editor.setSoftWrap(true)
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 30 * charWidth + 'px'
component.measureScrollView()
expect(node.querySelectorAll('.line-number').length).toBe 6 + lineOverdrawMargin + 1 # 1 dummy line node
expect(component.lineNumberNodeForScreenRow(0).textContent).toBe "#{nbsp}1"
expect(component.lineNumberNodeForScreenRow(1).textContent).toBe "#{nbsp}"
expect(component.lineNumberNodeForScreenRow(2).textContent).toBe "#{nbsp}2"
expect(component.lineNumberNodeForScreenRow(3).textContent).toBe "#{nbsp}"
expect(component.lineNumberNodeForScreenRow(4).textContent).toBe "#{nbsp}3"
expect(component.lineNumberNodeForScreenRow(5).textContent).toBe "#{nbsp}"
it "pads line numbers to be right-justified based on the maximum number of line number digits", ->
editor.getBuffer().setText([1..10].join('\n'))
for screenRow in [0..8]
expect(component.lineNumberNodeForScreenRow(screenRow).textContent).toBe "#{nbsp}#{screenRow + 1}"
expect(component.lineNumberNodeForScreenRow(9).textContent).toBe "10"
gutterNode = node.querySelector('.gutter')
initialGutterWidth = gutterNode.offsetWidth
# Removes padding when the max number of digits goes down
editor.getBuffer().delete([[1, 0], [2, 0]])
for screenRow in [0..8]
expect(component.lineNumberNodeForScreenRow(screenRow).textContent).toBe "#{screenRow + 1}"
expect(gutterNode.offsetWidth).toBeLessThan initialGutterWidth
# Increases padding when the max number of digits goes up
editor.getBuffer().insert([0, 0], '\n\n')
for screenRow in [0..8]
expect(component.lineNumberNodeForScreenRow(screenRow).textContent).toBe "#{nbsp}#{screenRow + 1}"
expect(component.lineNumberNodeForScreenRow(9).textContent).toBe "10"
expect(gutterNode.offsetWidth).toBe initialGutterWidth
describe "cursor rendering", ->
it "renders the currently visible cursors, translated relative to the scroll position", ->
cursor1 = editor.getCursor()
cursor1.setScreenPosition([0, 5])
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 20 * lineHeightInPixels + 'px'
component.measureScrollView()
cursorNodes = node.querySelectorAll('.cursor')
expect(cursorNodes.length).toBe 1
expect(cursorNodes[0].offsetHeight).toBe lineHeightInPixels
expect(cursorNodes[0].offsetWidth).toBe charWidth
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{5 * charWidth}px, #{0 * lineHeightInPixels}px, 0px)"
cursor2 = editor.addCursorAtScreenPosition([8, 11])
cursor3 = editor.addCursorAtScreenPosition([4, 10])
cursorNodes = node.querySelectorAll('.cursor')
expect(cursorNodes.length).toBe 2
expect(cursorNodes[0].offsetTop).toBe 0
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{5 * charWidth}px, #{0 * lineHeightInPixels}px, 0px)"
expect(cursorNodes[1].style['-webkit-transform']).toBe "translate3d(#{10 * charWidth}px, #{4 * lineHeightInPixels}px, 0px)"
verticalScrollbarNode.scrollTop = 4.5 * lineHeightInPixels
verticalScrollbarNode.dispatchEvent(new UIEvent('scroll'))
horizontalScrollbarNode.scrollLeft = 3.5 * charWidth
horizontalScrollbarNode.dispatchEvent(new UIEvent('scroll'))
cursorNodes = node.querySelectorAll('.cursor')
expect(cursorNodes.length).toBe 2
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{(11 - 3.5) * charWidth}px, #{(8 - 4.5) * lineHeightInPixels}px, 0px)"
expect(cursorNodes[1].style['-webkit-transform']).toBe "translate3d(#{(10 - 3.5) * charWidth}px, #{(4 - 4.5) * lineHeightInPixels}px, 0px)"
cursor3.destroy()
cursorNodes = node.querySelectorAll('.cursor')
expect(cursorNodes.length).toBe 1
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{(11 - 3.5) * charWidth}px, #{(6 - 2.5) * lineHeightInPixels}px, 0px)"
it "accounts for character widths when positioning cursors", ->
atom.config.set('editor.fontFamily', 'sans-serif')
editor.setCursorScreenPosition([0, 16])
cursor = node.querySelector('.cursor')
cursorRect = cursor.getBoundingClientRect()
cursorLocationTextNode = component.lineNodeForScreenRow(0).querySelector('.storage.type.function.js').firstChild
range = document.createRange()
range.setStart(cursorLocationTextNode, 0)
range.setEnd(cursorLocationTextNode, 1)
rangeRect = range.getBoundingClientRect()
expect(cursorRect.left).toBe rangeRect.left
expect(cursorRect.width).toBe rangeRect.width
it "blinks cursors when they aren't moving", ->
spyOn(_._, 'now').andCallFake -> window.now # Ensure _.debounce is based on our fake spec timeline
cursorsNode = node.querySelector('.cursors')
expect(cursorsNode.classList.contains('blink-off')).toBe false
advanceClock(component.props.cursorBlinkPeriod / 2)
expect(cursorsNode.classList.contains('blink-off')).toBe true
advanceClock(component.props.cursorBlinkPeriod / 2)
expect(cursorsNode.classList.contains('blink-off')).toBe false
# Stop blinking after moving the cursor
editor.moveCursorRight()
expect(cursorsNode.classList.contains('blink-off')).toBe false
advanceClock(component.props.cursorBlinkResumeDelay)
advanceClock(component.props.cursorBlinkPeriod / 2)
expect(cursorsNode.classList.contains('blink-off')).toBe true
it "does not render cursors that are associated with non-empty selections", ->
editor.setSelectedScreenRange([[0, 4], [4, 6]])
editor.addCursorAtScreenPosition([6, 8])
cursorNodes = node.querySelectorAll('.cursor')
expect(cursorNodes.length).toBe 1
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate3d(#{8 * charWidth}px, #{6 * lineHeightInPixels}px, 0px)"
it "updates cursor positions when the line height changes", ->
editor.setCursorBufferPosition([1, 10])
component.setLineHeight(2)
cursorNode = node.querySelector('.cursor')
expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{10 * editor.getDefaultCharWidth()}px, #{editor.getLineHeightInPixels()}px, 0px)"
it "updates cursor positions when the font size changes", ->
editor.setCursorBufferPosition([1, 10])
component.setFontSize(10)
cursorNode = node.querySelector('.cursor')
expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{10 * editor.getDefaultCharWidth()}px, #{editor.getLineHeightInPixels()}px, 0px)"
it "updates cursor positions when the font family changes", ->
editor.setCursorBufferPosition([1, 10])
component.setFontFamily('sans-serif')
cursorNode = node.querySelector('.cursor')
{left} = editor.pixelPositionForScreenPosition([1, 10])
expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{left}px, #{editor.getLineHeightInPixels()}px, 0px)"
describe "selection rendering", ->
[scrollViewNode, scrollViewClientLeft] = []
beforeEach ->
scrollViewNode = node.querySelector('.scroll-view')
scrollViewClientLeft = node.querySelector('.scroll-view').getBoundingClientRect().left
it "renders 1 region for 1-line selections", ->
# 1-line selection
editor.setSelectedScreenRange([[1, 6], [1, 10]])
regions = node.querySelectorAll('.selection .region')
expect(regions.length).toBe 1
regionRect = regions[0].getBoundingClientRect()
expect(regionRect.top).toBe 1 * lineHeightInPixels
expect(regionRect.height).toBe 1 * lineHeightInPixels
expect(regionRect.left).toBe scrollViewClientLeft + 6 * charWidth
expect(regionRect.width).toBe 4 * charWidth
it "renders 2 regions for 2-line selections", ->
editor.setSelectedScreenRange([[1, 6], [2, 10]])
regions = node.querySelectorAll('.selection .region')
expect(regions.length).toBe 2
region1Rect = regions[0].getBoundingClientRect()
expect(region1Rect.top).toBe 1 * lineHeightInPixels
expect(region1Rect.height).toBe 1 * lineHeightInPixels
expect(region1Rect.left).toBe scrollViewClientLeft + 6 * charWidth
expect(region1Rect.right).toBe scrollViewNode.getBoundingClientRect().right
region2Rect = regions[1].getBoundingClientRect()
expect(region2Rect.top).toBe 2 * lineHeightInPixels
expect(region2Rect.height).toBe 1 * lineHeightInPixels
expect(region2Rect.left).toBe scrollViewClientLeft + 0
expect(region2Rect.width).toBe 10 * charWidth
it "renders 3 regions for selections with more than 2 lines", ->
editor.setSelectedScreenRange([[1, 6], [5, 10]])
regions = node.querySelectorAll('.selection .region')
expect(regions.length).toBe 3
region1Rect = regions[0].getBoundingClientRect()
expect(region1Rect.top).toBe 1 * lineHeightInPixels
expect(region1Rect.height).toBe 1 * lineHeightInPixels
expect(region1Rect.left).toBe scrollViewClientLeft + 6 * charWidth
expect(region1Rect.right).toBe scrollViewNode.getBoundingClientRect().right
region2Rect = regions[1].getBoundingClientRect()
expect(region2Rect.top).toBe 2 * lineHeightInPixels
expect(region2Rect.height).toBe 3 * lineHeightInPixels
expect(region2Rect.left).toBe scrollViewClientLeft + 0
expect(region2Rect.right).toBe scrollViewNode.getBoundingClientRect().right
region3Rect = regions[2].getBoundingClientRect()
expect(region3Rect.top).toBe 5 * lineHeightInPixels
expect(region3Rect.height).toBe 1 * lineHeightInPixels
expect(region3Rect.left).toBe scrollViewClientLeft + 0
expect(region3Rect.width).toBe 10 * charWidth
it "does not render empty selections unless they are the first selection (to prevent a Chromium rendering artifact caused by removing it)", ->
editor.addSelectionForBufferRange([[2, 2], [2, 2]])
expect(editor.getSelection(0).isEmpty()).toBe true
expect(editor.getSelection(1).isEmpty()).toBe true
expect(node.querySelectorAll('.selection').length).toBe 1
it "updates selections when the line height changes", ->
editor.setSelectedBufferRange([[1, 6], [1, 10]])
component.setLineHeight(2)
selectionNode = node.querySelector('.region')
expect(selectionNode.offsetTop).toBe editor.getLineHeightInPixels()
it "updates selections when the font size changes", ->
editor.setSelectedBufferRange([[1, 6], [1, 10]])
component.setFontSize(10)
selectionNode = node.querySelector('.region')
expect(selectionNode.offsetTop).toBe editor.getLineHeightInPixels()
expect(selectionNode.offsetLeft).toBe 6 * editor.getDefaultCharWidth()
it "updates selections when the font family changes", ->
editor.setSelectedBufferRange([[1, 6], [1, 10]])
component.setFontFamily('sans-serif')
selectionNode = node.querySelector('.region')
expect(selectionNode.offsetTop).toBe editor.getLineHeightInPixels()
expect(selectionNode.offsetLeft).toBe editor.pixelPositionForScreenPosition([1, 6]).left
describe "hidden input field", ->
it "renders the hidden input field at the position of the last cursor if the cursor is on screen and the editor is focused", ->
editor.setVerticalScrollMargin(0)
editor.setHorizontalScrollMargin(0)
inputNode = node.querySelector('.hidden-input')
node.style.height = 5 * lineHeightInPixels + 'px'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
expect(editor.getCursorScreenPosition()).toEqual [0, 0]
editor.setScrollTop(3 * lineHeightInPixels)
editor.setScrollLeft(3 * charWidth)
expect(inputNode.offsetTop).toBe 0
expect(inputNode.offsetLeft).toBe 0
# In bounds, not focused
editor.setCursorBufferPosition([5, 4])
expect(inputNode.offsetTop).toBe 0
expect(inputNode.offsetLeft).toBe 0
# In bounds and focused
inputNode.focus()
expect(inputNode.offsetTop).toBe (5 * lineHeightInPixels) - editor.getScrollTop()
expect(inputNode.offsetLeft).toBe (4 * charWidth) - editor.getScrollLeft()
# In bounds, not focused
inputNode.blur()
expect(inputNode.offsetTop).toBe 0
expect(inputNode.offsetLeft).toBe 0
# Out of bounds, not focused
editor.setCursorBufferPosition([1, 2])
expect(inputNode.offsetTop).toBe 0
expect(inputNode.offsetLeft).toBe 0
# Out of bounds, focused
inputNode.focus()
expect(inputNode.offsetTop).toBe 0
expect(inputNode.offsetLeft).toBe 0
describe "mouse interactions", ->
linesNode = null
beforeEach ->
delayAnimationFrames = true
linesNode = node.querySelector('.lines')
describe "when a non-folded line is single-clicked", ->
describe "when no modifier keys are held down", ->
it "moves the cursor to the nearest screen position", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
editor.setScrollTop(3.5 * lineHeightInPixels)
editor.setScrollLeft(2 * charWidth)
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([4, 8])))
expect(editor.getCursorScreenPosition()).toEqual [4, 8]
describe "when the shift key is held down", ->
it "selects to the nearest screen position", ->
editor.setCursorScreenPosition([3, 4])
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([5, 6]), shiftKey: true))
expect(editor.getSelectedScreenRange()).toEqual [[3, 4], [5, 6]]
describe "when the command key is held down", ->
it "adds a cursor at the nearest screen position", ->
editor.setCursorScreenPosition([3, 4])
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([5, 6]), metaKey: true))
expect(editor.getSelectedScreenRanges()).toEqual [[[3, 4], [3, 4]], [[5, 6], [5, 6]]]
describe "when a non-folded line is double-clicked", ->
it "selects the word containing the nearest screen position", ->
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([5, 10]), detail: 2))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[5, 6], [5, 13]]
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([6, 6]), detail: 1))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[6, 6], [6, 6]]
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([8, 8]), detail: 1, shiftKey: true))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[6, 6], [8, 8]]
describe "when a non-folded line is triple-clicked", ->
it "selects the line containing the nearest screen position", ->
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([5, 10]), detail: 3))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[5, 0], [6, 0]]
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([6, 6]), detail: 1, shiftKey: true))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[5, 0], [7, 0]]
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([7, 5]), detail: 1))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([8, 8]), detail: 1, shiftKey: true))
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
expect(editor.getSelectedScreenRange()).toEqual [[7, 5], [8, 8]]
describe "when the mouse is clicked and dragged", ->
it "selects to the nearest screen position until the mouse button is released", ->
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([2, 4]), which: 1))
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([6, 8]), which: 1))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [6, 8]]
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([10, 0]), which: 1))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [10, 0]]
linesNode.dispatchEvent(buildMouseEvent('mouseup'))
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([12, 0]), which: 1))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [10, 0]]
it "stops selecting if the mouse is dragged into the dev tools", ->
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([2, 4]), which: 1))
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([6, 8]), which: 1))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [6, 8]]
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([10, 0]), which: 0))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [6, 8]]
linesNode.dispatchEvent(buildMouseEvent('mousemove', clientCoordinatesForScreenPosition([8, 0]), which: 1))
nextAnimationFrame()
expect(editor.getSelectedScreenRange()).toEqual [[2, 4], [6, 8]]
clientCoordinatesForScreenPosition = (screenPosition) ->
positionOffset = editor.pixelPositionForScreenPosition(screenPosition)
scrollViewClientRect = node.querySelector('.scroll-view').getBoundingClientRect()
clientX = scrollViewClientRect.left + positionOffset.left - editor.getScrollLeft()
clientY = scrollViewClientRect.top + positionOffset.top - editor.getScrollTop()
{clientX, clientY}
buildMouseEvent = (type, properties...) ->
properties = extend({bubbles: true, cancelable: true}, properties...)
event = new MouseEvent(type, properties)
Object.defineProperty(event, 'which', get: -> properties.which) if properties.which?
event
describe "focus handling", ->
inputNode = null
beforeEach ->
inputNode = node.querySelector('.hidden-input')
it "transfers focus to the hidden input", ->
expect(document.activeElement).toBe document.body
node.focus()
expect(document.activeElement).toBe inputNode
it "adds the 'is-focused' class to the editor when the hidden input is focused", ->
expect(document.activeElement).toBe document.body
inputNode.focus()
expect(node.classList.contains('is-focused')).toBe true
inputNode.blur()
expect(node.classList.contains('is-focused')).toBe false
describe "scrolling", ->
it "updates the vertical scrollbar when the scrollTop is changed in the model", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.scrollTop).toBe 0
editor.setScrollTop(10)
expect(verticalScrollbarNode.scrollTop).toBe 10
it "updates the horizontal scrollbar and the x transform of the lines based on the scrollLeft of the model", ->
node.style.width = 30 * charWidth + 'px'
component.measureScrollView()
linesNode = node.querySelector('.lines')
expect(linesNode.style['-webkit-transform']).toBe "translate3d(0px, 0px, 0px)"
expect(horizontalScrollbarNode.scrollLeft).toBe 0
editor.setScrollLeft(100)
expect(linesNode.style['-webkit-transform']).toBe "translate3d(-100px, 0px, 0px)"
expect(horizontalScrollbarNode.scrollLeft).toBe 100
it "updates the scrollLeft of the model when the scrollLeft of the horizontal scrollbar changes", ->
node.style.width = 30 * charWidth + 'px'
component.measureScrollView()
expect(editor.getScrollLeft()).toBe 0
horizontalScrollbarNode.scrollLeft = 100
horizontalScrollbarNode.dispatchEvent(new UIEvent('scroll'))
expect(editor.getScrollLeft()).toBe 100
it "does not obscure the last line with the horizontal scrollbar", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
editor.setScrollBottom(editor.getScrollHeight())
lastLineNode = component.lineNodeForScreenRow(editor.getLastScreenRow())
bottomOfLastLine = lastLineNode.getBoundingClientRect().bottom
topOfHorizontalScrollbar = horizontalScrollbarNode.getBoundingClientRect().top
expect(bottomOfLastLine).toBe topOfHorizontalScrollbar
# Scroll so there's no space below the last line when the horizontal scrollbar disappears
node.style.width = 100 * charWidth + 'px'
component.measureScrollView()
bottomOfLastLine = lastLineNode.getBoundingClientRect().bottom
bottomOfEditor = node.getBoundingClientRect().bottom
expect(bottomOfLastLine).toBe bottomOfEditor
it "does not obscure the last character of the longest line with the vertical scrollbar", ->
node.style.height = 7 * lineHeightInPixels + 'px'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
editor.setScrollLeft(Infinity)
rightOfLongestLine = component.lineNodeForScreenRow(6).getBoundingClientRect().right
leftOfVerticalScrollbar = verticalScrollbarNode.getBoundingClientRect().left
expect(Math.round(rightOfLongestLine)).toBe leftOfVerticalScrollbar - 1 # Leave 1 px so the cursor is visible on the end of the line
it "only displays dummy scrollbars when scrollable in that direction", ->
expect(verticalScrollbarNode.style.display).toBe 'none'
expect(horizontalScrollbarNode.style.display).toBe 'none'
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = '1000px'
component.measureScrollView()
expect(verticalScrollbarNode.style.display).toBe ''
expect(horizontalScrollbarNode.style.display).toBe 'none'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.style.display).toBe ''
expect(horizontalScrollbarNode.style.display).toBe ''
node.style.height = 20 * lineHeightInPixels + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.style.display).toBe 'none'
expect(horizontalScrollbarNode.style.display).toBe ''
it "makes the dummy scrollbar divs only as tall/wide as the actual scrollbars", ->
node.style.height = 4 * lineHeightInPixels + 'px'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
atom.themes.applyStylesheet "test", """
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
"""
scrollbarCornerNode = node.querySelector('.scrollbar-corner')
expect(verticalScrollbarNode.offsetWidth).toBe 8
expect(horizontalScrollbarNode.offsetHeight).toBe 8
expect(scrollbarCornerNode.offsetWidth).toBe 8
expect(scrollbarCornerNode.offsetHeight).toBe 8
it "assigns the bottom/right of the scrollbars to the width of the opposite scrollbar if it is visible", ->
scrollbarCornerNode = node.querySelector('.scrollbar-corner')
expect(verticalScrollbarNode.style.bottom).toBe ''
expect(horizontalScrollbarNode.style.right).toBe ''
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = '1000px'
component.measureScrollView()
expect(verticalScrollbarNode.style.bottom).toBe ''
expect(horizontalScrollbarNode.style.right).toBe verticalScrollbarNode.offsetWidth + 'px'
expect(scrollbarCornerNode.style.display).toBe 'none'
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.style.bottom).toBe horizontalScrollbarNode.offsetHeight + 'px'
expect(horizontalScrollbarNode.style.right).toBe verticalScrollbarNode.offsetWidth + 'px'
expect(scrollbarCornerNode.style.display).toBe ''
node.style.height = 20 * lineHeightInPixels + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.style.bottom).toBe horizontalScrollbarNode.offsetHeight + 'px'
expect(horizontalScrollbarNode.style.right).toBe ''
expect(scrollbarCornerNode.style.display).toBe 'none'
it "accounts for the width of the gutter in the scrollWidth of the horizontal scrollbar", ->
gutterNode = node.querySelector('.gutter')
node.style.width = 10 * charWidth + 'px'
component.measureScrollView()
expect(horizontalScrollbarNode.scrollWidth).toBe gutterNode.offsetWidth + editor.getScrollWidth()
describe "when a mousewheel event occurs on the editor", ->
describe "mousewheel events", ->
it "updates the scrollLeft or scrollTop on mousewheel events depending on which delta is greater (x or y)", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 20 * charWidth + 'px'
component.measureScrollView()
expect(verticalScrollbarNode.scrollTop).toBe 0
expect(horizontalScrollbarNode.scrollLeft).toBe 0
node.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -5, wheelDeltaY: -10))
expect(verticalScrollbarNode.scrollTop).toBe 10
expect(horizontalScrollbarNode.scrollLeft).toBe 0
node.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -15, wheelDeltaY: -5))
expect(verticalScrollbarNode.scrollTop).toBe 10
expect(horizontalScrollbarNode.scrollLeft).toBe 15
describe "when the mousewheel event's target is a line", ->
it "keeps the line on the DOM if it is scrolled off-screen", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 20 * charWidth + 'px'
component.measureScrollView()
lineNode = node.querySelector('.line')
wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -500)
Object.defineProperty(wheelEvent, 'target', get: -> lineNode)
node.dispatchEvent(wheelEvent)
expect(node.contains(lineNode)).toBe true
it "does not set the mouseWheelScreenRow if scrolling horizontally", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 20 * charWidth + 'px'
component.measureScrollView()
lineNode = node.querySelector('.line')
wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 10, wheelDeltaY: 0)
Object.defineProperty(wheelEvent, 'target', get: -> lineNode)
node.dispatchEvent(wheelEvent)
expect(component.mouseWheelScreenRow).toBe null
it "clears the mouseWheelScreenRow after a delay even if the event does not cause scrolling", ->
spyOn(_._, 'now').andCallFake -> window.now # Ensure _.debounce is based on our fake spec timeline
expect(editor.getScrollTop()).toBe 0
lineNode = node.querySelector('.line')
wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 10)
Object.defineProperty(wheelEvent, 'target', get: -> lineNode)
node.dispatchEvent(wheelEvent)
expect(editor.getScrollTop()).toBe 0
expect(component.mouseWheelScreenRow).toBe 0
advanceClock(component.mouseWheelScreenRowClearDelay)
expect(component.mouseWheelScreenRow).toBe null
it "does not preserve the line if it is on screen", ->
expect(node.querySelectorAll('.line-number').length).toBe 14 # dummy line
lineNodes = node.querySelectorAll('.line')
expect(lineNodes.length).toBe 13
lineNode = lineNodes[0]
wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 100) # goes nowhere, we're already at scrollTop 0
Object.defineProperty(wheelEvent, 'target', get: -> lineNode)
node.dispatchEvent(wheelEvent)
expect(component.mouseWheelScreenRow).toBe 0
editor.insertText("hello")
expect(node.querySelectorAll('.line-number').length).toBe 14 # dummy line
expect(node.querySelectorAll('.line').length).toBe 13
describe "when the mousewheel event's target is a line number", ->
it "keeps the line number on the DOM if it is scrolled off-screen", ->
node.style.height = 4.5 * lineHeightInPixels + 'px'
node.style.width = 20 * charWidth + 'px'
component.measureScrollView()
lineNumberNode = node.querySelectorAll('.line-number')[1]
wheelEvent = new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -500)
Object.defineProperty(wheelEvent, 'target', get: -> lineNumberNode)
node.dispatchEvent(wheelEvent)
expect(node.contains(lineNumberNode)).toBe true
describe "input events", ->
inputNode = null
beforeEach ->
inputNode = node.querySelector('.hidden-input')
it "inserts the newest character in the input's value into the buffer", ->
inputNode.value = 'x'
inputNode.dispatchEvent(new Event('input'))
expect(editor.lineForBufferRow(0)).toBe 'xvar quicksort = function () {'
inputNode.value = 'xy'
inputNode.dispatchEvent(new Event('input'))
expect(editor.lineForBufferRow(0)).toBe 'xyvar quicksort = function () {'
it "replaces the last character if the length of the input's value doesn't increase, as occurs with the accented character menu", ->
inputNode.value = 'u'
inputNode.dispatchEvent(new Event('input'))
expect(editor.lineForBufferRow(0)).toBe 'uvar quicksort = function () {'
inputNode.value = 'ü'
inputNode.dispatchEvent(new Event('input'))
expect(editor.lineForBufferRow(0)).toBe 'üvar quicksort = function () {'
describe "commands", ->
describe "editor:consolidate-selections", ->
it "consolidates selections on the editor model, aborting the key binding if there is only one selection", ->
spyOn(editor, 'consolidateSelections').andCallThrough()
event = new CustomEvent('editor:consolidate-selections', bubbles: true, cancelable: true)
event.abortKeyBinding = jasmine.createSpy("event.abortKeyBinding")
node.dispatchEvent(event)
expect(editor.consolidateSelections).toHaveBeenCalled()
expect(event.abortKeyBinding).toHaveBeenCalled()
describe "hiding and showing the editor", ->
describe "when fontSize, fontFamily, or lineHeight changes while the editor is hidden", ->
it "does not attempt to measure the lineHeight and defaultCharWidth until the editor becomes visible again", ->
wrapperView.hide()
initialLineHeightInPixels = editor.getLineHeightInPixels()
initialCharWidth = editor.getDefaultCharWidth()
component.setLineHeight(2)
expect(editor.getLineHeightInPixels()).toBe initialLineHeightInPixels
expect(editor.getDefaultCharWidth()).toBe initialCharWidth
component.setFontSize(22)
expect(editor.getLineHeightInPixels()).toBe initialLineHeightInPixels
expect(editor.getDefaultCharWidth()).toBe initialCharWidth
component.setFontFamily('monospace')
expect(editor.getLineHeightInPixels()).toBe initialLineHeightInPixels
expect(editor.getDefaultCharWidth()).toBe initialCharWidth
wrapperView.show()
expect(editor.getLineHeightInPixels()).not.toBe initialLineHeightInPixels
expect(editor.getDefaultCharWidth()).not.toBe initialCharWidth
describe "when lines are changed while the editor is hidden", ->
it "does not measure new characters until the editor is shown again", ->
editor.setText('')
wrapperView.hide()
editor.setText('var z = 1')
editor.setCursorBufferPosition([0, Infinity])
wrapperView.show()
expect(node.querySelector('.cursor').style['-webkit-transform']).toBe "translate3d(#{9 * charWidth}px, 0px, 0px)"
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
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,4 @@
module.exports =
activate: ->
deactivate: -> throw new Error('Top that')
serialize: ->
@@ -0,0 +1,13 @@
module.exports =
activateCallCount: 0
activationCommandCallCount: 0
legacyActivationCommandCallCount: 0
activate: ->
@activateCallCount++
atom.commands.add '.workspace', 'activation-command', =>
@activationCommandCallCount++
atom.workspaceView.getActiveView()?.command 'activation-command', =>
@legacyActivationCommandCallCount++
@@ -0,0 +1,2 @@
'activationCommands':
'.workspace': 'activation-command'
@@ -1,13 +0,0 @@
class Foo
atom.deserializers.add(this)
@deserialize: ({data}) -> new Foo(data)
constructor: (@data) ->
module.exports =
activateCallCount: 0
activationEventCallCount: 0
activate: ->
@activateCallCount++
atom.workspaceView.getActiveView()?.command 'activation-event', =>
@activationEventCallCount++
@@ -1 +0,0 @@
'activationEvents': ['activation-event']
@@ -0,0 +1,13 @@
module.exports =
config:
numbers:
type: 'object'
properties:
one:
type: 'integer'
default: 1
two:
type: 'integer'
default: 2
activate: -> # no-op
@@ -1,5 +1,5 @@
{
"name": "no events",
"version": "0.1.0",
"activationEvents": []
"activationCommands": {".workspace": []}
}
@@ -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;
}

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