Commit Graph

8410 Commits

Author SHA1 Message Date
Max Brunsfeld
275fb0eb36 Convert GitRepository spec to JS 2017-11-06 10:25:31 -08:00
Max Brunsfeld
351f96d5dd Iterate on GrammarRegistry APIs
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-11-06 09:36:06 -08:00
Jason Rudolph
935c63932f
Merge pull request #16090 from atom/decaf-token-iterator
 Decaffeinate TokenIterator
2017-11-06 09:25:10 -05:00
Jason Rudolph
761fa46863
Merge pull request #16073 from atom/decaf-theme-manager-spec
 Decaffeinate spec/theme-manager-spec.coffee
2017-11-04 08:29:12 -04:00
Max Brunsfeld
e6c3891e62 Assign a language mode in text editor component specs 2017-11-03 15:08:02 -07:00
Nathan Sobo
a1e8d25e55 Autoscroll to cursor position after folding or unfolding
There were several different fold/unfold code paths, so I decided to
weave simple autoscroll assertions into the existing tests.
2017-11-03 09:57:29 -06:00
Jason Rudolph
3a42785678
Decaffeinate spec/text-utils-spec.coffee 2017-11-03 08:21:01 -04:00
Jason Rudolph
7b5837afb8
Decaffeinate spec/token-iterator-spec.coffee 2017-11-03 07:53:28 -04:00
Michelle Tilley
a3bb0bbb44
Merge pull request #15935 from atom/mkt-core-uri-handlers
Add core URI handlers
2017-11-02 18:40:00 -07:00
Ash Wilson
809a2d6348
Merge pull request #16080 from atom/fb-hw-directory-watcher
Allow directory providers to implement a custom onDidChangeFiles
2017-11-02 18:30:59 -07:00
Michelle Tilley
0267829211
Change the way we test this 2017-11-02 16:45:52 -07:00
Michelle Tilley
fba5fbc42d
Merge remote-tracking branch 'origin/master' into mkt-core-uri-handlers 2017-11-02 16:30:29 -07:00
Michelle Tilley
99bef8e7d1
More debugging 2017-11-02 16:09:57 -07:00
Michelle Tilley
444597c845
Let's add some debugging 2017-11-02 15:49:06 -07:00
Michelle Tilley
178756b62a
update test 2017-11-02 15:27:59 -07:00
Michelle Tilley
ada75ed1dd
Fix bug in test 2017-11-02 14:45:14 -07:00
Michelle Tilley
668397c1d0
Fix flaky test 2017-11-02 14:11:52 -07:00
Nathan Sobo
d0587a0b60
Merge pull request #16075 from atom/fix-select-word
Fix select-word command between word and non-word chararacters
2017-11-02 14:41:39 -06:00
Michelle Tilley
db0fd527ce
Add test for core URI handler window-selection logic 2017-11-02 13:35:29 -07:00
Max Brunsfeld
0d6c746572 Add grammar registry as an injected dependency of Project 2017-11-02 12:24:11 -07:00
Max Brunsfeld
1a7ea3322e 🎨 project-spec.js 2017-11-02 12:13:31 -07:00
hansonw
303cf30b51 Allow directory providers to implement onDidChangeFiles for custom pathwatchers 2017-11-02 11:43:33 -07:00
Max Brunsfeld
99f90af427 Convert Selection spec to JS 2017-11-02 09:48:00 -07:00
Nathan Sobo
1e9753d8a5 Fix select-word command between word and non-word chararacters
In #15776, we accidentally stopped passing an option to the wordRegExp
method that caused us to prefer word characters when selecting words at
a boundary between word and non-word characters.
2017-11-02 10:22:22 -06:00
Jason Rudolph
7054eefe1d
Decaffeinate spec/theme-manager-spec.coffee 2017-11-02 09:20:08 -04:00
Max Brunsfeld
6277459691
Merge pull request #16066 from atom/mb-decaffeinate-text-editor
Convert TextEditor class to JS
2017-11-01 22:25:44 -07:00
Max Brunsfeld
96e6b3a2ce Fix error in .getLongTitle when editor isn't in the workspace 2017-11-01 16:51:01 -07:00
Max Brunsfeld
616ebe71d9 Convert text-editor-spec.coffee to JavaScript 2017-11-01 15:51:14 -07:00
Nathan Sobo
f25570f135 Exclude Shift from keydown events that terminate selection drags 2017-11-01 14:00:43 -06:00
Nathan Sobo
11511f27d5 Don't terminate selection dragging when a modifier key is pressed
This preserves the ability to add selections via ctrl- or cmd-click.
2017-11-01 09:22:38 -06:00
Wliu
b6c804d637
Do not modify menus 2017-11-01 13:59:21 +01:00
Jason Rudolph
3d855b494d Merge pull request #15981 from atom/decaf-tooltip-manager-spec
️ Decaffeinate `spec/tooltip-manager-spec.coffee`
2017-10-26 08:48:55 -04:00
Nathan Sobo
6e55b29331 Merge pull request #15993 from atom/dont-destroy-contained-folds
Preserve folds that are fully contained by the selection when changing selection ranges
2017-10-25 16:36:37 -06:00
Steven Hobson-Campbell
bbb331e1f7 Merge remote-tracking branch 'upstream/master' into tests 2017-10-25 14:14:12 -07:00
Nathan Sobo
d44d6abe53 Merge pull request #15990 from atom/non-asar-legacy-spec-project-path
Don't assign a default project path for package specs that
2017-10-25 12:57:16 -06:00
Nathan Sobo
00242541ae Don't destroy folds that are completely contained within a selection 2017-10-25 12:25:04 -06:00
Nathan Sobo
364964ea0a Always assign a project path outside of bundle for legacy package specs
This prevents package specs that don't have a fixtures directory from
attempting to read files out of a non-existent directory inside the ASAR
bundle, which causes ENOTDIR errors in superstring.

If the spec does not have a parent folder containing a fixtures
directory, we now set the default project path to `os.tmpdir()`.
2017-10-25 10:34:43 -06:00
Wliu
2bf9e4b0c7
Use scope names rather than names
Some languages are not guaranteed to have names
2017-10-25 17:36:21 +02:00
Max Brunsfeld
9a95372613 Merge pull request #15977 from atom/mb-use-language-modes
Move `toggleLineComments` method from TokenizedBuffer to TextEditor
2017-10-24 16:03:21 -07:00
Jason Rudolph
fc620b9e80
🎨 Move helper functions outside of describe block 2017-10-24 09:06:50 -04:00
Jason Rudolph
aa69409b1b
🎨 Prefer arrow function syntax 2017-10-24 09:04:11 -04:00
Jason Rudolph
706f7e3d44
🎨 DS102 Remove unnecessary code created because of implicit returns 2017-10-24 08:58:59 -04:00
Jason Rudolph
76eb993e7e
🎨 DS101 Remove unnecessary use of Array.from 2017-10-24 08:56:20 -04:00
Jason Rudolph
90cfb69c7c
👕 Fix "'tooltipElement' is assigned a value but never used" 2017-10-24 08:53:24 -04:00
Jason Rudolph
f976c93d5a
👕 Fix "'disposable' is assigned a value but never used" 2017-10-24 08:51:40 -04:00
Jason Rudolph
7f75a46b97
👕 Fix "Return statement should not contain assignment" 2017-10-24 08:51:15 -04:00
Jason Rudolph
f771cf9d1a
Decaffeinate spec/tooltip-manager-spec.coffee
Apply results of running:

  $ decaffeinate --keep-commonjs --prefer-const --loose-default-params --loose-for-expressions --loose-for-of --loose-includes spec/tooltip-manager-spec.coffee

  $ standard --fix spec/tooltip-manager-spec.js
2017-10-24 08:47:44 -04:00
Jason Rudolph
622589f4f7 Merge pull request #15958 from atom/decaf-view-registry
 Decaffeinate `ViewRegistry`
2017-10-24 08:41:32 -04:00
Nathan Sobo
84f6f3e525 Merge pull request #15976 from atom/paste-without-reformatting
Add command to paste without reformatting
2017-10-23 20:21:38 -06:00
Max Brunsfeld
079f4d901c Move all .toggleLineComments tests to text-editor-spec.js 2017-10-23 17:00:05 -07:00
Max Brunsfeld
311567ecec Simplify .toggleLineComments method to avoid using oniguruma 2017-10-23 16:45:12 -07:00
leroix
c2662761f0 Merge pull request #15954 from atom/faster-overlay-resizing
Only update overlay instead of text editor when resize occurs
2017-10-23 17:05:57 -06:00
Nathan Sobo
6701644bbd Respect format-preserving options in TextEditor.pasteText 2017-10-23 17:02:41 -06:00
Nathan Sobo
bbbf09ecf2 Add preserveTrailingLineIndentation option to Selection.insertText
We can use this to support a new command that preserves all formatting
when pasting.
2017-10-23 16:46:38 -06:00
Justin Ratner
ed94726fab fix overlayComponent access syntax in test 2017-10-23 14:32:34 -06:00
Max Brunsfeld
49a2d0eeeb Merge pull request #15974 from atom/mb-fix-fold-current-row-error
Fix exception when trying to fold non-foldable row
2017-10-23 11:12:52 -07:00
Max Brunsfeld
8d532e7780 Fix exception when trying to fold non-foldable row 2017-10-23 10:20:45 -07:00
Jason Rudolph
db960763cf Merge pull request #15947 from atom/decaf-window-event-handler-spec
️ Decaffeinate `spec/window-event-handler-spec.coffee`
2017-10-23 08:39:31 -04:00
Jason Rudolph
01e7faa988
👔 Fix "Arrow function should not return assignment" 2017-10-21 10:10:06 -04:00
Jason Rudolph
33aea76058
👔 Fix "The object literal notation {} is preferrable" 2017-10-21 10:07:13 -04:00
Jason Rudolph
9a6f4b1647
👔 Fix "'model' is assigned a value but never used" 2017-10-21 10:05:57 -04:00
Jason Rudolph
c6d438c509
Decaffeinate spec/view-registry-spec.coffee 2017-10-21 10:05:22 -04:00
Justin Ratner
089717cbd3 fix failing test 2017-10-20 15:46:27 -06:00
Wliu
1975e37e31 Merge pull request #13597 from Ingramz/rework-grammar-scores
Prioritize first line matches over bundled/non bundled cirteria in grammar scoring
2017-10-20 22:30:51 +02:00
Jason Rudolph
d23510fce9
️ Decaffeinate spec/window-event-handler-spec.coffee 2017-10-20 08:36:20 -04:00
Indrek Ardel
0f89211d55 Prioritize first line matches over bundled/non bundled cirteria 2017-10-20 13:34:15 +03:00
Michelle Tilley
158622ce48
Convert array of windows in AtomApplication to a WindowStack 2017-10-19 14:19:24 -07:00
Jason Rudolph
4db60e34b8
👔 Fix linter error: "Arrow function should not return assignment." 2017-10-18 20:13:55 -04:00
Jason Rudolph
49655a97c8
🎨 2017-10-18 20:10:24 -04:00
Jason Rudolph
6e78281a73
🎨 Prefer fat arrow function syntax 2017-10-18 19:54:51 -04:00
Jason Rudolph
498d7c90eb
Rewrite code to no longer use __guard__ 2017-10-18 19:54:51 -04:00
Jason Rudolph
db115d3ab8
Remove unnecessary code created because of implicit returns 2017-10-18 19:54:51 -04:00
Jason Rudolph
61b228d8a0
Remove unnecessary use of Array.from 2017-10-18 19:54:51 -04:00
Jason Rudolph
c632e6ca58
Decaffeinate spec/project-spec.coffee
Apply results of running:

```
$ decaffeinate --keep-commonjs --prefer-const --loose-default-params --loose-for-expressions --loose-for-of --loose-includes spec/project-spec.js

$ standard --fix spec/project-spec.js
```
2017-10-18 19:54:51 -04:00
Antonio Scandurra
280253fdfa Merge pull request #15916 from atom/as-jr-stop-dragging-when-interacting-with-keyboard
Stop dragging only when user interacts with keyboard
2017-10-18 11:38:52 +02:00
Michelle Tilley
5e43084cd3
url -> URI 2017-10-17 15:23:10 -07:00
Michelle Tilley
5e96429c9e
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-10-17 11:18:02 -07:00
Antonio Scandurra
65af9e953b Stop dragging only when user interacts with keyboard
Previously, we used to prevent the user from dragging the selection
further when the buffer was about to change. This was problematic
because any change in the buffer, even one that was performed
"automatically" by a package, would cancel the dragging action and
result in a confusing experience for the user.

On the other hand, we want to prevent users from accidentally selecting
text when they perform an edit (see #15217, #15405).

This commit addresses both concerns by canceling the dragging as soon as
the user interacts with the keyboard, instead of canceling the dragging
when the buffer is about to change.

One downside of this approach is that it changes the behavior of
pressing a keystroke that does not result in a buffer change, e.g.
Shift, Arrow Keys, etc.

Signed-off-by: Jason Rudolph <jasonrudolph@github.com>
2017-10-17 18:50:20 +02:00
Antonio Scandurra
7853e3cd8c Don't throw when destroying block decorations inside marker change event 2017-10-11 09:42:53 +02:00
Jason Rudolph
7463925e94 Merge pull request #15834 from atom/jr-decaf-gutter-container
Decaffeinate `GutterContainer`
2017-10-07 15:12:38 -04:00
Jason Rudolph
f79708a74a Merge pull request #15823 from atom/jr-decaf-gutter
Decaffeinate `Gutter`
2017-10-06 09:35:11 -04:00
Jason Rudolph
d546037863
Decaffeinate spec/gutter-container-spec.coffee 2017-10-06 09:33:43 -04:00
Antonio Scandurra
d83304cbdd Exercise more features in the randomized test
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-10-05 19:41:28 +02:00
Jason Rudolph
51df9a308a
Decaffeinate spec/gutter-spec.coffee 2017-10-05 11:06:42 -04:00
Antonio Scandurra
ec14125ecb 🎨 2017-10-05 13:51:26 +02:00
Antonio Scandurra
ae57cd268e Delete unnecessary test code 2017-10-05 13:51:26 +02:00
Antonio Scandurra
1ca49d8f17 Move random-seed into script/package.json
...so that it doesn't get included in the final application bundle.
2017-10-05 13:51:26 +02:00
Antonio Scandurra
6e3b8cb9f8 Introduce randomized test for TextEditorComponent 2017-10-05 13:05:52 +02:00
Michelle Tilley
eb4357ce87
Add tests for packages with URI handlers 2017-10-03 13:20:48 -07:00
Michelle Tilley
4b67353f85
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-10-03 13:16:02 -07:00
Max Brunsfeld
c46140946e Merge pull request #15798 from atom/mb-prompt-to-save-in-conflict
Prompt to save when unloading if editor is in conflict
2017-10-03 12:36:43 -07:00
Nathan Sobo
f317a458ea Merge pull request #15800 from atom/ns-fix-soft-wrap-rendering-bug
Fix rendering bug when folds cause the vertical scrollbar to disappear with soft wrapping enabled
2017-10-03 13:22:15 -06:00
Max Brunsfeld
4d057a16d6 Prompt to save when unloading if editor is in conflict 2017-10-03 11:09:33 -07:00
Max Brunsfeld
44d6868855 Preserve indentation when toggling comments on whitespace-only lines 2017-10-03 10:14:45 -07:00
Nathan Sobo
293b52d797 Fix rendering bug when folds hide the vertical scrollbar w/ soft wrap on 2017-10-03 11:09:44 -06:00
Max Brunsfeld
a778d5e09c 🎨 2017-09-28 17:09:55 -07:00
Max Brunsfeld
1d0dfe2213 Use async/await in package-manager-spec 2017-09-28 17:04:46 -07:00
Max Brunsfeld
a7db6ce7b1 Convert package-manager-spec to JS 2017-09-28 16:25:34 -07:00
Max Brunsfeld
969cb7a0f5 Merge pull request #15692 from UziTech/pane-onDidChangePath
Pane on did change path
2017-09-28 11:51:12 -07:00
Max Brunsfeld
6a86a1c7bf Wait for repo to refresh in test 2017-09-27 14:19:05 -07:00
Michelle Tilley
67df9d5eff
Add history to UrlHandlerRegistry 2017-09-27 13:00:42 -07:00
Michelle Tilley
ce85537674
Fix spec 2017-09-27 12:41:03 -07:00
Max Brunsfeld
c12a5b23b4 Convert git-repository-provider-spec to JS 2017-09-27 12:18:17 -07:00
Max Brunsfeld
345e236d86 Fix toggleLineCommentsForBufferRows 2017-09-25 09:52:15 -07:00
Max Brunsfeld
090b753d84 Move toggleLineCommentsForBufferRows to TokenizedBuffer 2017-09-24 10:34:34 -07:00
Max Brunsfeld
cd1a265dd3 Move .suggestedIndentForBufferRow tests to tokenized-buffer-spec 2017-09-24 09:54:06 -07:00
Max Brunsfeld
274a699272 Remove unused method TokenizedBuffer.indentLevelForRow 2017-09-22 16:20:10 -07:00
Max Brunsfeld
62e94f7b96 Rename language-mode-spec.js to text-editor-spec.js
This gets the ball rolling toward converting the text editor specs to JS
2017-09-22 14:40:34 -07:00
Max Brunsfeld
0884546d3c Move everything but auto-indent out of LanguageMode 2017-09-22 14:33:02 -07:00
Max Brunsfeld
6c1356cae3 Move folding logic from LanguageMode to TokenizedBuffer
* Restate the folding logic to not *use* the TextEditor, but instead to
*return* ranges which can be folded by the editor.
* Convert the LanguageMode spec to JS
2017-09-22 12:04:51 -07:00
Max Brunsfeld
b1a3460ad9 Fix scope name in TokenizedBuffer test 2017-09-21 15:52:07 -07:00
Michelle Tilley
eecd524788
Differenter 2017-09-21 14:57:33 -07:00
Michelle Tilley
c52d517d13
Limit argument parsing when --url-handler is set 2017-09-21 14:50:41 -07:00
Max Brunsfeld
4c2680e68a Organize TokenizedBuffer test 2017-09-21 14:31:13 -07:00
Max Brunsfeld
15a5728751 Use async/await in TokenizedBuffer test 2017-09-21 14:27:52 -07:00
Max Brunsfeld
1ca1c545ba Convert TokenizedBuffer spec to JS 2017-09-21 14:06:05 -07:00
Michelle Tilley
3621f07149
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-09-21 13:51:15 -07:00
Wliu
129c0cc0e3 Fix tokenized buffer spec 2017-09-21 20:57:15 +02:00
Michelle Tilley
f5d1539645
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-09-20 20:33:44 -07:00
Ash Wilson
880188b4b9
👕 Unnecessary fat arrows 2017-09-20 10:52:33 -04:00
Ash Wilson
99feb7f264
Spelling 2017-09-20 10:51:30 -04:00
Ash Wilson
1a53ad5722
Deserialize TextBuffers that have never been saved to disk 2017-09-20 10:51:30 -04:00
Ash Wilson
0782f0f4d0
"Retire" buffer IDs when the buffer can't be deserialized 2017-09-20 10:51:30 -04:00
Ash Wilson
868d9393de
Deserialize the exact serialized project paths, never a parent dir 2017-09-20 10:51:29 -04:00
Ash Wilson
7d62f8b6eb
Test for omitting deleted files 2017-09-20 10:51:29 -04:00
Ash Wilson
bdc503a795
Report deserialization errors from the project 2017-09-20 10:51:29 -04:00
Ash Wilson
48c1fb0f3c
.deserialize() is async 2017-09-20 10:51:29 -04:00
Ash Wilson
928a3e2854
Expect the deserialization promise to reject with inaccessible dirs 2017-09-20 10:51:29 -04:00
Ash Wilson
3d51ed9766
Support {mustExist} option in setPaths 2017-09-20 10:51:29 -04:00
Ash Wilson
156cd02953
Optionally throw an error when attempting to open a non-existent dir 2017-09-20 10:51:29 -04:00
Tony Brix
1e72a7f0e5 fix tests 2017-09-19 15:30:25 -05:00
Tony Brix
abeebd51ef add test dispose 2017-09-19 14:37:30 -05:00
Tony Brix
8b67b7037c add specs 2017-09-19 14:37:29 -05:00
Max Brunsfeld
9bdf4b01d0 Merge pull request #15643 from atom/mb-async-onWillDestroyPaneItem
Wait for async PaneContainer.onWillDestroyPaneItem listeners
2017-09-19 11:21:54 -07:00
Michelle Tilley
f6d7cdd417
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-09-19 09:29:58 -07:00
Michelle Tilley
0ae64c37de
Add UrlHandlerRegistry 2017-09-18 17:33:51 -07:00
Michelle Tilley
bf4985e265
🔥 MessageRegistry 2017-09-18 17:33:42 -07:00
Max Brunsfeld
666adb2f0e Convert pane-container-spec to JS 2017-09-18 17:02:48 -07:00
Michelle Tilley
9e74e164b6
Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch 2017-09-18 16:49:12 -07:00
Jason Rudolph
0054e3f796
💀 Decaffeinate spec/notification-manager-spec.coffee 2017-09-16 21:03:04 -04:00
Jason Rudolph
45c3770293
💀 Decaffeinate spec/notification-spec.coffee 2017-09-16 21:03:01 -04:00
Max Brunsfeld
19e56b5b3b Wait for async onWillDestroyPaneItem listeners 2017-09-13 13:31:33 -07:00
Max Brunsfeld
2374077a6e Wait for async onWillDestroyItem handlers before destroying item 2017-09-12 15:04:37 -07:00
Ash Wilson
8632e73d07 Merge pull request #15440 from atom/ku-reload-config-when-created
Replace pathwatcher w/ bundled watcher to catch created & rename events
2017-09-12 15:23:19 -04:00
Ash Wilson
fb4d7ee5e5
Clean the pending operations too 2017-09-12 14:39:17 -04:00
Ash Wilson
7737aec3ae
🔥 fdescribe 2017-09-12 11:25:29 -04:00
Ash Wilson
e275a5ff76
Ensure that .get calls before .requestLoad return .set properties 2017-09-12 11:21:20 -04:00
Ash Wilson
18a0a5a857
.set operations should be immediately visible through .get 2017-09-12 10:33:46 -04:00
Ash Wilson
e9588c8fae
Bring the new spec up to date 2017-09-12 10:18:09 -04:00
Ash Wilson
adb032adf1
Some cosmetic coffeescript changes 2017-09-12 10:16:50 -04:00
Ash Wilson
bf121eab72
Remove some diagnostics 2017-09-12 10:16:25 -04:00
Ash Wilson
fa0bd1e049
Use a real clock and artificial file mtimes to work with nsfw 2017-09-12 10:15:55 -04:00
Ash Wilson
21e220cd5f
Stub the correct fs method 2017-09-12 10:13:05 -04:00
Ash Wilson
046ff87f01
Trick the specs into seeing the settings as loaded 2017-09-12 10:12:38 -04:00
wpowell-oss
0b55d4e144 maxScreenLineLength rebased to github 2017-09-12 14:38:29 +12:00
wpowell-oss
f2bb941a51 Rebase to github/master 2017-09-12 13:58:26 +12:00
Warren Powell
a73f68c0dd Spec test for setMaxScreenLineLength 2017-09-12 13:58:26 +12:00
Wliu
1a4e6c4c85 Merge pull request #15603 from jsoref/spelling
Spelling
2017-09-10 18:29:38 +02:00
Josh Soref
feb27a6676 spelling: visible 2017-09-10 15:46:41 +00:00
Josh Soref
dee7be7dd6 spelling: syntactic 2017-09-10 15:46:41 +00:00
Josh Soref
3bf9be2a47 spelling: separated 2017-09-10 15:46:41 +00:00
Josh Soref
9ca5662bcb spelling: recycle 2017-09-10 15:46:40 +00:00
Josh Soref
1b93fcf35f spelling: recover 2017-09-10 15:46:40 +00:00
Josh Soref
00130a7589 spelling: programmatically 2017-09-10 15:46:40 +00:00
Josh Soref
161a7f1788 spelling: perseveres 2017-09-10 15:46:40 +00:00
Josh Soref
27e021e22b spelling: precedes 2017-09-10 15:46:40 +00:00
Josh Soref
6fc5ff8513 spelling: previous 2017-09-10 15:46:40 +00:00
Josh Soref
d425272725 spelling: indentation 2017-09-10 15:46:39 +00:00
Josh Soref
ee87ac1604 spelling: falsy 2017-09-10 15:46:39 +00:00
Josh Soref
6ce5f48203 spelling: doesn't 2017-09-10 15:46:39 +00:00
Josh Soref
fa249d5764 spelling: cursor 2017-09-10 15:46:39 +00:00
Josh Soref
2dc531b23c spelling: contiguous 2017-09-10 15:46:39 +00:00
Josh Soref
1b7f3cad92 spelling: beginning 2017-09-10 15:46:38 +00:00
Josh Soref
5cbe7c8897 spelling: appearance 2017-09-10 15:46:38 +00:00
Damien Guard
199bab8993
Fix a few more tests 2017-09-08 19:00:27 -07:00
Damien Guard
79fbef8e24
👕 2017-09-08 19:00:26 -07:00
Damien Guard
468f4a47a9
Fix another two tests 2017-09-08 19:00:26 -07:00
Damien Guard
af66c5efaa
Fix two more tests 2017-09-08 19:00:26 -07:00
Damien Guard
0a2ff530ff
Get more tests working after async 2017-09-08 19:00:26 -07:00
Damien Guard
69e631d509
Allow Promises to be returned by a package deactivate method 2017-09-08 19:00:25 -07:00
Antonio Scandurra
c1981ffb44 Correctly remove block decorations whose markers have been destroyed
In https://github.com/atom/atom/pull/15503 we mistakenly assumed
`marker.isValid` accounted only for the validity of the marker. However,
that method returns `false` also for markers that are valid but have
been destroyed. As a result, the editor component was mistakenly not
removing block decorations associated with such markers.

With this commit we will rely on the local `wasValid` variable instead.
If its value is `true`, it means that the block decoration has been
accounted for in the `lineTopIndex` and must, as a result, be cleaned up
in case the marker or the decoration gets destroyed.
2017-09-07 17:52:04 +02:00
Antonio Scandurra
806b652da4 Flush scroll position to dummy scrollbar components on re-attach
This prevents the dummy scrollbars from resetting their position to `0`
when the editor element is moved elsewhere in the DOM (e.g. when
splitting a pane item).
2017-09-07 15:05:42 +02:00
Antonio Scandurra
7bd2c670e1 Merge pull request #15546 from atom/as-never-autoscroll-when-clicking-on-content
Don't autoscroll when using the mouse to add, delete or move selections
2017-09-06 02:12:15 -07:00
Antonio Scandurra
9bbd71219d Merge pull request #15550 from atom/as-fix-rendering-out-of-range-decorations
Don't render block decorations located outside the visible range
2017-09-06 02:11:16 -07:00
Steven Hobson-Campbell
18087ff48c Merge branch 'master' of https://github.com/atom/atom into tests 2017-09-05 17:58:56 -07:00
Damien Guard
38d9c07284
Add test coverage for package-manager initialize paths 2017-09-05 09:12:26 -07:00
Antonio Scandurra
20ea98ad41 Don't render block decorations located outside the visible range
Previously, when trying to use block decorations on non-empty markers,
Atom could sometimes throw an error if such markers ended or started at
a position that was not currently rendered.

In fact, even if we already restricted the decoration query to markers
that intersected the visible row range, markers that were only partially
visible would still be considered for rendering. If, depending on the
`reversed` property, we decided to render the tail or head of the marker
in question and this was outside the viewport, Atom would throw the
aforementioned exception.

This commit addresses the above issue by explicitly ignoring block
decorations that are located on rows that are not yet rendered.
2017-09-05 18:05:35 +02:00
Antonio Scandurra
91bb1e12c7 Don't autoscroll when using the mouse to add, delete or move selections 2017-09-05 15:26:54 +02:00
Antonio Scandurra
6e919e7acd Don't remeasure invalid block decorations
This fixes an uncaught exception that was being thrown after
invalidating a marker and resizing the editor.
2017-09-02 11:11:27 +02:00
Bryant Ung
96b3af143d Merge pull request #15163 from atom/fb-wb-modal-focus
Automatically manage focus for modal panels
2017-08-31 17:09:02 -07:00
Antonio Scandurra
3e10a84d49 Merge pull request #15506 from atom/as-honor-scrollbar-visible-only-when-scrolling
Honor macOS "Show scrollbars only when scrolling" setting
2017-08-31 11:29:26 +02:00
Antonio Scandurra
f85deec482 Merge pull request #15503 from atom/as-fix-invalidated-block-decoration-markers
Fix rendering of block decorations for invalid markers
2017-08-31 11:29:14 +02:00
Antonio Scandurra
12e6740c9c Merge pull request #15487 from atom/as-scroll-sensitivity
Always honor scroll intent on mousewheel
2017-08-31 11:28:16 +02:00
Antonio Scandurra
ac9cc72845 Merge pull request #15486 from atom/as-highlights-outside-of-tiles
Move highlight decorations outside of tiles
2017-08-31 11:26:15 +02:00
Bryant Ung
3bf8344519 Merge branch 'master' into fb-wb-modal-focus 2017-08-30 17:06:29 -07:00
Antonio Scandurra
50088b16c9 Honor macOS "Show scrollbars only when scrolling" setting
Previously, we were hiding scrollbars when their height/width was 0. On
macOS, however, users can decide to only show scrollbars while
scrolling, which causes Atom to detect scrollbars as being invisible
during measurements. As a result, we were mistakenly setting the
visibility property to `hidden` when this setting was on, thus
preventing users from seeing the scrollbar on scroll.

With this commit we are changing the dummy scrollbar components to only
become invisible when the content is not scrollable rather than when the
scrollbars have zero width or height.

As part of this, we have also renamed the
`is{Horizontal,Vertical}ScrollbarVisible` functions to
`canScroll{Horizontally,Vertically}`, to better express their intent.
2017-08-30 17:11:40 +02:00
Antonio Scandurra
9bf47f31cb Fix rendering of block decorations for invalid markers
Previously, when a marker became invalid we would delete the
corresponding block decoration from the DOM, without however removing it
from the `lineTopIndex`. Also, we had a similar issue when decorating a
marker that was already invalid: we would account for it in the index
without adding it to the DOM.

This commit addresses the above problems by ensuring that block
decorations are never added for invalid markers. At the same time, the
editor component will still keep track of changes on the marker that was
decorated, so that it can detect when its validity changes and render it
appropriately.
2017-08-30 14:25:20 +02:00
Max Brunsfeld
bd9570b165 Merge pull request #15446 from atom/mb-remove-runas
Use fs-admin instead of runas
2017-08-29 10:14:42 -07:00
Nathan Sobo
d016b09fb4 Merge pull request #15383 from atom/fb-wb-command-meta
[Commands] Add support for rich listener objects with first-class metadata
2017-08-29 09:54:41 -06:00
Antonio Scandurra
76e2e03139 Always honor scroll intent on mousewheel
This commit introduces a change in the way we respond to mousewheel
events. In particular, if `delta * scrollSensitivity` is less than 1 or
greater than -1, we will round it up or down in an attempt to honor the
user's scroll intent.
2017-08-29 13:39:11 +02:00