Nathan Sobo
8d87eb2ed6
Style the .line-numbers div to be compatible w/ both themes and the GPU
...
The .line-numbers div has to have an opaque background because it's
sent as a texture to the GPU, and otherwise it will have isuses with
subpixel antialiasing.
However, themes style the background of the .gutter div, which was
getting obscured by the opaque background of the line numbers. This
commit adds the .gutter class to the .line-numbers div as well and
ensures it always fills the entire height of the editor.
2014-06-18 12:36:40 -06:00
Kevin Sawicki
29d26a4fae
Increase timeout on Windows CI
2014-06-18 10:04:41 -07:00
Nathan Sobo
53c363b853
Merge pull request #2615 from adnelson/feature/delete-to-end-of-line
...
added delete to end of line
2014-06-18 10:46:48 -06:00
Corey Johnson
2e73a46cbc
Merge pull request #2603 from atom/cj-expose-resizing-to-editor
...
Expose resizing to editor
2014-06-18 09:19:43 -07:00
Ben Ogle
e89e2141d7
Merge pull request #2605 from atom/bo-ns-highlights
...
Add highlight decorations
2014-06-17 17:42:18 -07:00
probablycorey
ff0cddfd1d
Merge remote-tracking branch 'origin/master' into cj-expose-resizing-to-editor
2014-06-17 17:22:10 -07:00
Ben Ogle
a7ec7497e2
nof
2014-06-17 17:09:26 -07:00
Nathan Sobo
2fffbba503
Eliminate Decoration class and use plain objects instead
2014-06-17 17:35:56 -06:00
Corey Johnson & Nathan Sobo
4564a39392
Remove measureScrollView helper
2014-06-17 16:09:23 -07:00
Corey Johnson & Nathan Sobo
068c1e6249
Use polling to detect editor resize
2014-06-17 16:07:07 -07:00
Nathan Sobo
edadedce7b
Give highlight decorations unique id's to avoid potential React errors
...
Using the marker's id plus the decoration class can cause an error in
the event we apply a decoration with the same class twice to the same
marker. This is admittedly unlikely, but I think it's cleaner to just
allocate unique id's for decoration objects.
2014-06-17 15:03:45 -06:00
Nathan Sobo
89be77b0a9
💄
2014-06-17 14:47:49 -06:00
Nathan Sobo
99ba20ae0d
Don't render empty highlights
2014-06-17 14:47:12 -06:00
Corey Johnson
c06f5911c6
Update editor height change spec
2014-06-17 13:26:56 -07:00
Kevin Sawicki
3de926a1af
Hide when no deprecations
2014-06-17 11:36:07 -07:00
Kevin Sawicki
3601aac136
Correct deprecation label
2014-06-17 11:32:53 -07:00
Kevin Sawicki
de8b498402
Add deprecations to spec runner
2014-06-17 11:28:01 -07:00
Ben Ogle
ef09fbbfb2
Remove softWrap decoration option
2014-06-17 11:24:27 -07:00
Nathan Sobo
14bed8a3c8
Merge pull request #2587 from atom/bo-ns-input-handling
...
Handle textInput events in a way that works with autocomplete-plus
2014-06-17 10:11:34 -06:00
Ben Ogle
04bbe393d4
Remove log lines
2014-06-16 16:51:46 -07:00
Ben Ogle
c21f8a5a6c
💄 clean up spec names
2014-06-16 16:05:48 -07:00
Ben Ogle
32fba97c3a
Add a spec for highlights in folds
2014-06-16 15:56:55 -07:00
Ben Ogle
dff27eba18
Specs for highlights
2014-06-16 15:36:09 -07:00
Ben Ogle
d2908c75fc
Rename redundant describe
2014-06-16 15:36:09 -07:00
Ben Ogle
084632a985
Rename Selection(s)Component to Highlight(s)Component
2014-06-16 15:36:08 -07:00
Ben Ogle
002e14990b
Rename bufferRowHasClass
2014-06-16 15:36:08 -07:00
Ben Ogle
3a3fc4b614
Add a spec for screen line changes
2014-06-16 15:36:08 -07:00
Ben Ogle
e128212410
Fix decoration specs to work with markers only
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
120e2a3bdb
Move decoration Editor specs to DisplayBuffer
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
7142022f05
Add intersection support to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
25520a4cad
Add containedInScreenRange to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
56da6399b8
Add startScreenRow and endScreenRow to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Allen Nelson
8411d41621
deleting only selection if selection is not empty
2014-06-16 16:13:40 -05:00
Allen Nelson
fc462fcd21
added delete to end of line
2014-06-16 10:59:55 -05:00
Nathan Sobo
9e6756ed6d
Don't perform an update in response scroll view dimension changes
...
We always measure the scroll view in the ::componentWillUpdate hook, so
performing *another* update in response to the measurement causes an
invariant violation in react. Whenever we are measuring, we are always
already updating.
2014-06-13 17:07:41 -06:00
Corey Johnson
025370b9f8
Add editor component resize spec
2014-06-12 16:17:18 -07:00
Corey Johnson
e179860519
Merge pull request #2571 from lee-dohm/bug-2526
...
Change line commenting to uncomment if all non-blank lines are commented out
2014-06-12 08:45:47 -07:00
Ivan Žužak
43f8596fb1
Merge pull request #2584 from atom/iz-fix-tab-unindent
...
Outdent only if a tab is matched at the start of the line
2014-06-12 17:39:23 +02:00
Ben Ogle
7e6e61905b
Move the cursor on pageUp / pageDown
...
Previously it was only moving the scrollTop, but not the cursors.
Affected on the react editor.
Refs #2423
2014-06-11 17:19:59 -07:00
Ben Ogle & Nathan Sobo
1c410cbf5a
Handle textInput events in EditorComponent instead of on InputComponent
...
This commit also changes input handling to be more like it was in the
previous editor. We're using textInput rather than input events because
they are emitted *before* characters are inserted, enabling much simpler
detection of characters inserted via the accented-character menu on
OS X.
Previously I avoided this because something about it was causing reflows
in the old editor, but in this editor that doesn't seem to be a problem,
and it's actually faster.
2014-06-11 16:40:46 -06:00
Ben Ogle
87915f70e2
editor.scrollSensitivity option
2014-06-11 12:07:49 -07:00
Kevin Sawicki
32245b1d92
Remove humanizeKeystrokes specs
...
These are already tested thoroughly in underscore-plus and
they are now platform-specific now which this spec was not
expecting.
2014-06-11 10:59:08 -07:00
Nathan Sobo
030bcd6d4f
Make react cursor the width of a default character at the end of lines
...
When the cursor is positioned before a character, we always make it the
width of that character. But at the end of a line, there is no character
to use to set the width, so we just use the defaultCharWidth.
This makes the block cursor visible on empty lines in vim-mode.
2014-06-11 11:54:10 -06:00
Nathan Sobo
7c1a4a9e08
Don't clip range start/end in DisplayBuffer::pixelRectForScreenRange
...
Fixes #2583
This prevents the cursor from having 0 width inside atomic tokens.
2014-06-11 11:40:57 -06:00
Ivan Zuzak
07308a4e04
✅ Add test for outdenting with tabs after normal characters
2014-06-11 19:02:14 +02:00
Corey Johnson
94dd1eed54
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/editor-component.coffee
2014-06-11 08:56:27 -07:00
Nathan Sobo
1b026cc805
Set is-focused class on React editor's wrapper view for now
2014-06-11 08:37:16 -06:00
Nathan Sobo
b73d267a5f
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 07:34:41 -06:00
Nathan Sobo
7040906473
Ignore null bytes when measuring character widths in React editor
...
Fixes #2391
2014-06-11 07:18:52 -06:00
Nathan Sobo
131aad24c0
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 06:48:16 -06:00
Nathan Sobo
64870c733b
Add API for enabling/disabling input to support vim-mode's insert mode
2014-06-11 06:07:41 -06:00
Nathan Sobo
68ca6a0a0d
Merge pull request #2532 from karlin/select-paragraphs
...
Adds select-to-beginning-of-next/previous-paragraph commands
2014-06-11 05:39:30 -06:00
probablycorey
9e7e77bdf8
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/gutter-component.coffee
2014-06-10 15:42:23 -07:00
probablycorey
d0385a90ea
Revert "Use ReactEditorView in the workspace view spec"
...
This reverts commit b46ac9080c
.
2014-06-10 15:37:49 -07:00
Lee Dohm
ea4f99e5ac
Add test to illustrate the problem
...
See #2526
2014-06-09 21:18:03 -07:00
probablycorey
b46ac9080c
Use ReactEditorView in the workspace view spec
2014-06-09 17:35:44 -07:00
Ben Ogle
756347a716
Add has-selection
class to the editor div when there is a selection
2014-06-09 15:45:32 -07:00
Ben Ogle
dc6836dc2d
Add specs for cursor-line decorations
2014-06-09 15:18:12 -07:00
Ben Ogle
2087426afc
Specs for decorationsForBufferRow
2014-06-09 15:05:43 -07:00
Ben Ogle
e59f242f19
Move click gutter into the GutterComponent
2014-06-09 14:11:41 -07:00
Ben Ogle
bae625a894
Add spec for when lines become foldable
2014-06-09 14:04:24 -07:00
Ben Ogle
b5532ee4a3
💄 spec
...
Use the event system to click on the gutter
2014-06-09 14:04:24 -07:00
Ben Ogle
a8df77243c
Fix spec
...
I changed the width of the gutter in b0af7cfc12729e9ef1320c0b178cc024bc0e60cc
16 characters is still within the break range of the word 'wraps'
2014-06-09 14:04:23 -07:00
Ben Ogle
8e1e5a3760
Add ability to click the fold icons
2014-06-09 14:04:23 -07:00
Ben Ogle
5cd8f5952f
Make editor push decorator updates to the gutter
2014-06-09 14:04:23 -07:00
Ben Ogle
1b8be75a76
Add specs for the editor interface
...
for decorations in ranges and associated with markers
2014-06-09 14:04:23 -07:00
Ben Ogle
235180cf03
Add specs for fold rendering
2014-06-09 14:04:23 -07:00
Ben Ogle
a13990155f
Use setImmediate rather than setTimeout
2014-06-09 14:04:23 -07:00
Ben Ogle
5bae58eeb1
Clean up specs based on feedback.
2014-06-09 14:04:22 -07:00
Ben Ogle
6ce859774a
Name changes
2014-06-09 14:04:22 -07:00
Ben Ogle
fa4a6e2d71
Nof
2014-06-09 14:04:22 -07:00
Ben Ogle
79578e08ab
Specs for marker decorations
2014-06-09 14:04:22 -07:00
Ben Ogle
d51894103d
Debounce the rendering of decorations
2014-06-09 14:04:22 -07:00
Ben Ogle
eb59196c02
Rendering decorations works well.
...
Also specs.
2014-06-09 14:04:22 -07:00
Ben Ogle
142eedd705
Renders decoration changes.
2014-06-09 14:04:22 -07:00
Ben Ogle
77d269c6d9
Beginning of decorations
2014-06-09 14:04:22 -07:00
Corey Johnson
4d6737230a
Remove unused mousewheel event spec
2014-06-09 13:55:19 -07:00
Nathan Sobo
8521114c08
Fix failures associated with not passing focused: true
on pane splits
2014-06-09 17:09:02 +09:00
Nathan Sobo
c972d9b022
Get invisibles from component state
2014-06-09 15:11:16 +09:00
Nathan Sobo
a2c41a2ae3
Don't use the react editor in EditorView specs
2014-06-09 14:52:56 +09:00
Nathan Sobo
2f3d74c047
Merge branch 'master' into cj-add-react-editor-shims
...
Conflicts:
src/react-editor-view.coffee
2014-06-06 23:59:54 +09:00
karlin
2f45685a06
remove focused describes
2014-06-06 08:40:15 -04:00
karlin
8577bf9a4c
select to beginning of next or previous paragraph commands
2014-06-06 08:37:59 -04:00
Kevin Sawicki
ff9c031f57
Use path.join instead of path.resolve
...
Applies commit 41ab48b
to spec-bootstrap.coffee
2014-06-04 10:01:45 -07:00
Kevin Sawicki
e99996d5b4
Match backslashes in stack traces on Windows
2014-06-04 09:38:13 -07:00
Nathan Sobo
6cba6af743
Temporary: Enable react editor for specs on this branch so we get CI feedback
2014-06-04 19:18:54 +09:00
Kevin Sawicki
f97db691c3
Add back core spec require
...
This was accidentally deleted in #2462
2014-06-03 17:26:02 -07:00
Corey Johnson
8e095d7b5b
Merge pull request #2164 from steffengy/fix-indent
...
Fix indenting of HTML tags for instance. Fix #1294
2014-06-03 12:01:44 -07:00
Corey Johnson
0f551d4b11
Add expectations to context-menu specs
2014-06-03 10:44:45 -07:00
Corey Johnson
35a7bb115d
Fix context-menu specs
2014-06-03 10:44:45 -07:00
Corey Johnson
8ed3b7a250
Merge pull request #2134 from erikhakansson/AdvancedContextMenu
...
Advanced context menu
2014-06-03 10:13:37 -07:00
Nathan Sobo
3134bfda95
Update selections when the font size or font family change
2014-06-03 17:43:57 +09:00
Nathan Sobo
1c177aa206
Add spec for cursor position updates when the font family changes
2014-06-03 17:43:57 +09:00
Nathan Sobo
ec65def5d3
Add spec for cursor position updates when the font size changes
2014-06-03 17:43:57 +09:00
Nathan Sobo
3aefa53b33
Batch together line and character width measurement after font changes
...
This ensures we only perform a single update with the most up-to-date
information about line height, default character width, and specific
character widths. If this update causes more lines to be drawn we may
measure again, but not necessarily.
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
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
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