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
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
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
Dietmar Schabus
2c6b7973f9
adding spec pinpointing atom:atom#8648 which now passes
2017-03-26 19:44:43 +02:00
Nathan Sobo
28508d9a3f
Make decorationsForScreenRowRange return all decorations
...
Even if they are for markers that aren't on the default marker layer
2017-02-14 11:44:38 -07:00
Andres Suarez
1ee9d7b0f9
Add showCursorOnSelection config
2017-01-20 08:53:28 -05:00
Christopher Chedeau
ef7ce7cd3a
Always reserve two digits on the line number gutter
...
We are working on a feature that changes the content of the editor when you mouse over some things and it makes the UI jump when going from 1 line to > 10. This makes the UI feel really bad.
I've looked at Sublime and the 1-9 state is the same as 1-99, only when you reach 100 lines then it jumps. I think that it is a better behavior as you want to minimize jumps as much as possible and it is extremely likely that you are going to hit the 9-10 lines threshold.
![](http://g.recordit.co/ABIlZf5eTx.gif )
While this is being reviewed and until the new version shipped, we are going to monkeypatch Atom in order to get this feature.
```js
var presenter = atom.textEditors.editors.entries().next().value[0].presenter.__proto__;
var old_updateLineNumberGutterState = presenter.updateLineNumberGutterState;
presenter.updateLineNumberGutterState = function() {
var res = old_updateLineNumberGutterState.apply(this, arguments);
this.lineNumberGutter.maxLineNumberDigits = Math.max(2, this.lineNumberGutter.maxLineNumberDigits);
return res;
};
```
Released under CC0
2017-01-10 18:14:50 -08:00
Max Brunsfeld
d7b86d9187
Merge remote-tracking branch 'origin/master' into mb-ns-integrate-new-display-layer
2016-12-14 12:16:50 -08:00
Max Brunsfeld
8afeae46b4
Adjust assertion now that paired characters aren't wrapped in spans
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-12-13 17:29:36 -08:00
Max Brunsfeld
4f7b9e03c8
Expect a single leading whitespace token w/ atomic soft tabs & indent guides disabled
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-12-13 17:28:54 -08:00
Damien Guard
e89c5efa9d
Text editor measures diff in one test on win32
2016-11-29 16:55:14 -08:00
Antonio Scandurra
83f3c296f3
Add test for clicking an SVG element
2016-11-24 10:12:39 +01:00
Antonio Scandurra
4df74beba7
Merge branch 'master' into as-deprecate-shadow-dom
2016-10-17 12:06:00 +02:00
Antonio Scandurra
3d2e18747f
Prefer using new TextEditor
to Workspace.prototype.buildTextEditor
2016-10-10 09:28:36 +02:00
Antonio Scandurra
91df848b8a
Keep a backward compatible DOM structure for atom-text-editor
contents
2016-10-07 10:40:41 +02:00
Antonio Scandurra
9c5bddaa69
Reimplement block decorations without the shadow DOM
2016-10-07 10:40:41 +02:00
Antonio Scandurra
b71b412ede
Transform deprecated shadow DOM selectors
2016-10-07 10:40:41 +02:00
Antonio Scandurra
56a6510b25
Start on removing shadow DOM
2016-10-07 10:40:41 +02:00
Nathan Sobo
f723bccc29
Add test coverage for deprecated implicit disabling of autoHeight
2016-08-18 14:03:44 -06:00
Nathan Sobo
9f8f03b10f
Add test coverage for TextEditor autoHeight
2016-08-18 13:45:00 -06:00