Commit Graph

8097 Commits

Author SHA1 Message Date
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
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
Antonio Scandurra
b486e3edda Move highlight decorations outside of tiles
As a consequence of https://github.com/atom/atom/pull/15378, we are now
able to render highlight decorations in a separate div, as opposed to
having an highlight container for each tile.

Code-wise this is much simpler, because highlights spanning multiple
tiles can be represented via a single region and don't need to be split
across the tiles they span anymore. As a byproduct, performance should
improve as well, because the number of nodes that need to be managed
should decrease significantly.

This also fixes https://github.com/atom/atom/issues/15449, and other
similar rendering artifacts, because highlight decoration DOM nodes
won't need to move between tiles anymore when their position changes.
2017-08-29 11:44:07 +02:00
Will Binns-Smith
b7c328fd59 Clean up docs and comment wording 2017-08-28 14:49:54 -07:00
Jason Rudolph
425a48bd28 Merge pull request #15438 from atom/b3-dont-move-undefined
Don't attempt to move undefined items when splitting panes
2017-08-28 15:56:22 -04:00
Max Brunsfeld
c8303d6391 Replace runas with fs-admin in CommandInstaller
Also, convert CommandInstaller to JavaScript.
2017-08-25 15:46:43 -07:00
Nathan Sobo
dfe411a1d0 Merge pull request #15420 from atom/as-ns-simplify-line-node-lookup
Simplify line node lookup
2017-08-24 14:49:48 -06:00
Linus Eriksson
27f17318d7 Don't attempt to move undefined items when splitting panes 2017-08-24 16:15:06 +02:00
Linus Eriksson
58faf475c9 Fix so all directions are tested in the specs 2017-08-24 14:49:48 +02:00
Will Binns-Smith
2ac1d54557 handleEvent -> onDidDispatch 2017-08-23 13:27:16 -07:00