Commit Graph

7676 Commits

Author SHA1 Message Date
Nathan Sobo
5c7208751f Correctly autoscroll if a horizontal scrollbar appears in the same frame 2017-05-05 09:29:28 +02:00
Nathan Sobo
5d82dcf87a Wait for content width to update before autoscrolling horizontally 2017-05-05 09:29:28 +02:00
Nathan Sobo
758466c9af Make various tweaks to improve mini editors
Still a ways to go, but this is a start toward getting the mini-editors
to play nice with our existing styling.
2017-05-05 09:29:28 +02:00
Nathan Sobo
c2206b88da Destroy folds on fold marker click 2017-05-05 09:29:27 +02:00
Nathan Sobo
68659d9698 When decorating a MarkerLayer, get its corresponding DisplayMarkerLayer
This fixes 'folded' line number decorations.
2017-05-05 09:29:27 +02:00
Nathan Sobo
a2f75c8337 Toggle folds when clicking the arrow icon in the line number gutter 2017-05-05 09:29:27 +02:00
Nathan Sobo
cf19d0efd5 Autoscroll vertically when click-dragging the line number gutter 2017-05-05 09:29:27 +02:00
Nathan Sobo
6e9a9ef43c Add spec structure 2017-05-05 09:29:27 +02:00
Nathan Sobo
ffc2025df5 Handle clicking, shift-clicking, cmd-clicking and dragging in gutter 2017-05-05 09:29:27 +02:00
Nathan Sobo
17d579f949 Only handle the left mouse button (and middle on Linux) 2017-05-05 09:29:27 +02:00
Nathan Sobo
35ae3fb08f Implement autoscroll when mouse is dragged on content 2017-05-05 09:29:27 +02:00
Nathan Sobo
5594c9d82f Expand selections on mouse drag 2017-05-05 09:29:27 +02:00
Nathan Sobo
4ef9d385f3 Add tests for shift-clicking in wordwise and linewise mode 2017-05-05 09:29:27 +02:00
Nathan Sobo
e92cf0fe70 Fix event handler method name in specs 2017-05-05 09:29:27 +02:00
Nathan Sobo
c410309827 Expand selections on shift-click 2017-05-05 09:29:27 +02:00
Nathan Sobo
35753c3a8d Add specs for single-, triple-, and cmd-clicking 2017-05-05 09:29:27 +02:00
Nathan Sobo
2996500d90 Handle double and triple click on lines 2017-05-05 09:29:27 +02:00
Nathan Sobo
fab5a93254 Set cursor position on single click 2017-05-05 09:29:27 +02:00
Nathan Sobo
9a38e8c0d1 Support scrollPastEnd option 2017-05-05 09:29:27 +02:00
Nathan Sobo
c80dbbce3c Add tests for highlight rendering 2017-05-05 09:29:27 +02:00
Nathan Sobo
003f6ff231 Add test for off-screen cursors of selections intersecting rendered rows
We should not attempt to render these cursors even though part of their
associated selection is visible.
2017-05-05 09:29:27 +02:00
Nathan Sobo
aade501040 Refactor to unify computations related to tiles 2017-05-05 09:29:27 +02:00
Nathan Sobo
09f8a52b9d Implement special options for line and line number decorations
* onlyEmpty
* onlyNonEmpty
* onlyHead
* omitEmptyLastLine
2017-05-05 09:29:27 +02:00
Nathan Sobo
ff325c0151 Render line and line number decorations 2017-05-05 09:29:27 +02:00
Nathan Sobo
e15e7e3c96 Assign width and character dimensions on editor to update soft wraps 2017-05-05 09:29:27 +02:00
Nathan Sobo
30cd83f7aa Convert DecorationManager to JS 2017-05-05 09:29:27 +02:00
Nathan Sobo
94294d1b92 Test autoscrolling via scrollToScreenPosition instead of cursor 2017-05-05 09:29:27 +02:00
Nathan Sobo
b9feddacbe Fail focus tests quickly and clearly if document isn't focused 2017-05-05 09:29:27 +02:00
Nathan Sobo
3e87f9f889 Add horizontal autoscroll 2017-05-05 09:29:27 +02:00
Nathan Sobo
192e7c6b63 Handle direct focus of hidden input and avoid redundant focus renders 2017-05-05 09:29:27 +02:00
Nathan Sobo
ec045d9333 Gracefully handle focus events that occur before the attachedCallback 2017-05-05 09:29:27 +02:00
Nathan Sobo
ff2f9b192a Implement vertical autoscroll; still need tests 2017-05-05 09:29:27 +02:00
Nathan Sobo
c52d66377f Render hidden input and handle focus and blur 2017-05-05 09:29:27 +02:00
Nathan Sobo
b362f746f8 Fix spurious selections marker layer update to avoid extra render 2017-05-05 09:29:27 +02:00
Nathan Sobo
be7f4a5ffd Add workaround in test, but we need to make MarkerLayer updates sync 2017-05-05 09:29:27 +02:00
Nathan Sobo
d780b15248 Add cursor rendering tests 2017-05-05 09:29:27 +02:00
Nathan Sobo
583c2c537d Iron out scheduling issues
* Ensure multiple calls to scheduleUpdate only result in a single call
to updateSync in the future.
* Explicit calls to update sync after scheduling an update fulfill the
scheduled update.
* Track whether we think the editor is visible or not to avoid redundant
didShow calls.
* Ensure we only update on resize events if the editor actually changed
size.
2017-05-05 09:29:27 +02:00
Nathan Sobo
19d1d148eb Measure the longest visible screen line on initial render 2017-05-05 09:29:27 +02:00
Nathan Sobo
ede5d5e5f4 Add coverage for gutter measurement and horizontal translation on scroll 2017-05-05 09:29:27 +02:00
Nathan Sobo
b863790390 Start on new TextEditorComponent specs; avoid excessive line numbers 2017-05-05 09:29:27 +02:00
Wliu
c638f8693a Update spec reporter relativization
Electron 1.6 changed the reporting from .<anonymous> to
jasmine.Spec.<anonymous>
2017-05-03 14:21:24 +02:00
Nathan Sobo
a0c84d592a Remove ViewRegistry.pollDocument
Supporting it via mutation observers has a bad impact on frame rate.
2017-05-03 14:21:24 +02:00
Thomas Johansen
ceb05f03e2 💚 Make the "invalid" Babel fixture throw
Due to the V8 upgrade we need to tune the fixture to make it throw.
Using a generator function does the trick 
2017-05-03 14:21:23 +02:00
Max Brunsfeld
d47c780e08 Merge pull request #14221 from atom/fb-mdt-no-cmd-w-on-permanent-dock-items
Don't close permanent dock items
2017-04-18 09:47:39 -07:00
Max Brunsfeld
14f9c68659 Use getTreeViewRootDirectories helper in main process test 2017-04-17 13:53:20 -07:00
Max Brunsfeld
52195e79ff Merge branch 'master' into fb-mdt-no-cmd-w-on-permanent-dock-items 2017-04-17 13:39:16 -07:00
Max Brunsfeld
0015e026a2 Add Workspace.paneContainerForItem method 2017-04-17 11:34:45 -07:00
Matthew Dapena-Tretter
a4c06c039d Add a way to force a pane to destroy its item
When cleaning up after a package that provides a permanent dock item,
you want to be able to destroy it easily. This provides API for doing
so.
2017-04-15 13:28:30 -07:00
Matthew Dapena-Tretter
a9d0618e88 Don't close permanent dock items 2017-04-15 13:09:08 -07:00
Matthew Dapena-Tretter
d40a14be29 Add tests for dock sizing behavior 2017-04-15 11:50:41 -07:00