Commit Graph

15902 Commits

Author SHA1 Message Date
Nathan Sobo
03463da729 Allow Editor::batchUpdates calls to be nested 2014-06-03 17:43:56 +09:00
Nathan Sobo
1cc5ef3479 Update selections when the line height changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
77f78d0a11 Update cursors component if the defaultCharWidth changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
8f98f2368b Base gutter updates on defaultCharWidth instead of fontSize/Family 2014-06-03 17:43:56 +09:00
Nathan Sobo
f467e3eed4 Move decision to measure lineHeight/charWidths to EditorComponent
This prevents the double-update of the lines component when changing
the font-size, line-height and font-family. We detect the update of
these values in the root component and trigger a measurement. If the
measurement determines that the pixel values have changed, *then* we
update the lines.
2014-06-03 17:43:56 +09:00
Nathan Sobo
3052fe3f3b Update cursors when the line height in pixels changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
1bce626324 Compute ranges of cursors & selections in EditorComponent and pass down
Previously, SelectionsComponenet::shouldComponentUpdate was storing the
ranges for selections as a side effect. We also were passing boolean
values (cursorMoved and selectionUpdated) to determine if these
components should update.

Now, we compute a simple hash of screen ranges for selections and
cursors in the root component and pass them down. This simplifies
shouldComponentUpdate for selections and allows us to implement one
for cursors.
2014-06-03 17:43:55 +09:00
Nathan Sobo
e222998f82 Only compare screenRow to mouseWheelScreen row when it is defined
Fixes #2482
2014-06-03 17:43:35 +09:00
Kevin Sawicki
2aca16dc6b Upgrade to language-hyperlink@0.10 2014-06-02 21:38:26 -07:00
Kevin Sawicki
653a2623bf 🏁 bind ctrl-alt-up-down to adding selections 2014-06-02 15:59:13 -07:00
Kevin Sawicki
03ce9e0ec8 Upgrade to symbols-view@0.55 2014-06-02 15:58:56 -07:00
Kevin Sawicki
0245ec28eb Always handle resolving absolute URIs 2014-06-02 15:45:47 -07:00
Kevin Sawicki
94f86cb461 Don't resolve uris when project has not path 2014-06-02 15:41:05 -07:00
Kevin Sawicki
b4871fddfb Upgrade to release-notes@0.32 2014-06-02 14:21:54 -07:00
Kevin Sawicki
a598dcc259 🏁 Match Chrome's Settings menu item 2014-06-02 13:51:38 -07:00
Kevin Sawicki
918c86476c Check for href attribute on currentTarget
This makes clicking on images wrapped in anchor tags open correctly.
2014-06-02 13:35:18 -07:00
Kevin Sawicki
4d65a220e2 Add support for a ATOM_DEV_RESOURCE_PATH env var
This is helpful on windows to set a default dev resource path that
isn't ~/github/atom since on Windows it is common to clone Atom to C:\atom
2014-06-02 12:38:33 -07:00
Ben Ogle
7697f19c3d Merge pull request #2474 from atom/bo-add-shift-keymaps
Add missing shift-backspace and shift-delete bindings
2014-06-02 10:58:02 -07:00
Kevin Sawicki
6ad6409efe Merge pull request #2462 from atom/ks-windows-spec-fixes
Get core specs green on Windows
2014-06-02 10:25:09 -07:00
Kevin Sawicki
b6fcc35131 Write removed file to temp directory 2014-06-02 10:17:13 -07:00
Kevin Sawicki
bd873dc851 Upgrade to first-mate@1.6.1 2014-06-02 10:17:13 -07:00
Kevin Sawicki
4c2931f6b5 Use forward slash on all platforms
Paths are normalized by git-utils to use / on all platforms
2014-06-02 10:17:13 -07:00
Kevin Sawicki
1704c78eea Enable core specs when run outside of clone repo
The failing specs have been updated so that specs
can now run without the requirement of a Git repository
at the root.
2014-06-02 10:17:13 -07:00
Kevin Sawicki
bcad8c1b3e Remove # which is interpreted as a tag
This spec was not running because of it since
jasmine-tagged is configured to filter tags by
process.platform
2014-06-02 10:17:13 -07:00
Kevin Sawicki
81d9193bf4 Copy repository to temp folder 2014-06-02 10:17:13 -07:00
Kevin Sawicki
7514f70434 Set project path to temp working directory 2014-06-02 10:17:13 -07:00
Kevin Sawicki
12a8688a9b Copy repository in remaining specs 2014-06-02 10:17:13 -07:00
Kevin Sawicki
0524a724e1 Move fixtures into repo 2014-06-02 10:17:13 -07:00
Kevin Sawicki
805c7ae301 💄 2014-06-02 10:17:13 -07:00
Kevin Sawicki
3f3dabed41 Remove spec completely tested in git-utils library 2014-06-02 10:17:13 -07:00
Kevin Sawicki
516035a82c Add copyRepository helper 2014-06-02 10:17:12 -07:00
Kevin Sawicki
08686ee769 Use temp directory in isPathNew/Modified specs 2014-06-02 10:17:12 -07:00
Kevin Sawicki
5b479ad5f5 Use temp directory in checkoutHead specs 2014-06-02 10:17:12 -07:00
Kevin Sawicki
d4366aa09e Pass element not jQuery object as target
Previously this was passing since ctrl-z was completely unbound at
this point which isn't the case on Windows.
2014-06-02 10:17:12 -07:00
Corey Johnson
3f549bbada Merge pull request #2477 from atom/ns-react-remove-scroll-view-component
Merge EditorScrollViewComponent into EditorComponent
2014-06-02 08:02:49 -07:00
Nathan Sobo
1187d50b81 Fix inequality in LinesComponent::shouldComponentUpdate
Change objects from the display-buffer are currently end-row inclusive.
I'd like to fix this, but not until we switch editors.
2014-06-02 19:17:30 +09:00
Ben Ogle
a1d4c2a4c7 Upgrade to silarized-dark-syntax@0.15.0 2014-06-01 11:57:09 -07:00
Nathan Sobo
afe386ce40 💄 EditorComponent method order 2014-06-01 18:31:47 +09:00
Nathan Sobo
d31669c67f Merge EditorScrollViewComponent into Editor
I don't think that this component was really carrying its weight. Its
render function basically passed through directly to other components
that updated between renders, but didn't contain any content on its
own that actually changed after the first render.

React components seem to carry overhead, so I want every component we
use to count. Also, I'm considering circumventing some of React's
standard update logic for performance reasons, and making the structure
more shallow will help with that.
2014-06-01 15:24:59 +09:00
Ben Ogle
5259a1ced4 Add missing shift-backspace and shift-delete bindings 2014-05-31 16:15:36 -07:00
Nathan Sobo
61ee1be2cb Merge pull request #2463 from atom/ns-react-fix-duplicate-lines
Fix line duplication in React editor
2014-05-31 19:52:35 +09:00
Nathan Sobo
2548891b99 Clear the mousewheelScreenRow even if the event does not cause scrolling
If a mousewheel event is triggered when the editor can't be scrolled,
we still want to clear the mouseWheelScreenRow. This is typically done
when we stop scrolling, but if we never start scrolling it will never
happen. This commit adds another timeout to cover that case.
2014-05-31 18:36:59 +09:00
Nathan Sobo
115a7e1dfb 💄 Give mousewheel events their own describe block 2014-05-31 18:20:27 +09:00
Kevin Sawicki
5d2be8d5c5 Upgrade to apm 0.61 2014-05-30 17:39:49 -07:00
Kevin Sawicki
6d08ade20c Upgrade to apm 0.60 2014-05-30 17:31:43 -07:00
Nathan Sobo
0043072ecf Only preserve mouseWheelScreenRow if it's out of the rendered row range
Fixes #2429, #2443

Otherwise, it's possible to duplicate lines. If a line is in the
rendered row range and it's not in the set of lines returned by the
editor, we should remove it no matter what. Line preservation is only
intended for lines that are out of view.
2014-05-31 08:56:57 +09:00
Nathan Sobo
89c57b6d52 Only set the mouseWheelScreenRow when scrolling vertically
When we handle a mousewheel event targeting a line or line number, we
assign the mousewheelScreenRow to prevent the removal of the target
node, which interferes with velocity scrolling.

However, the ::mousewheelScreenRow is only cleared 100ms after we stop
scrolling vertically. This means that if we're only scrolling
horizontally, it's never cleared. This causes the line node associated
with this screen row to hang around longer until the mousewheel screen
row is cleared again, which is not what we want.

This commit only assigns the ::mousewheelScreenRow when scrolling
vertically, so we can be sure it will be cleared.
2014-05-31 08:56:57 +09:00
Nathan Sobo
f2a08cd178 Update the lines and gutter when the mouseWheelScreenRow changes 2014-05-31 08:56:56 +09:00
Nathan Sobo
df524e4803 Fix bug in LinesCompoent::shouldComponentUpdate 2014-05-31 08:56:32 +09:00
Corey Johnson
b8c4b83653 Merge pull request #2461 from atom/cj-fix-data-gutter-add-class-to-line
Fix data gutter add class to line
2014-05-30 15:25:52 -07:00