Ben Ogle
30aa47026d
Do not move cursor when interacting with horiz scrollbar
...
Fix #3284
2014-08-21 10:40:16 -07:00
Nathan Sobo
5cb084d568
Fix editor:move-to-first-character-of-line with leading hard tabs
...
Fixes #3314
2014-08-19 11:50:04 -06:00
Kevin Sawicki
0eaec57f7b
Merge pull request #3116 from maschs/ms-srcLint
...
coffeelint!
2014-08-15 13:52:15 -07:00
Nathan Sobo
6c52bcf20c
Assign ::firstNonWhitespace/TrailingWhitespaceIndex in Token::split
...
Fixes #3277
2014-08-15 12:58:27 -06:00
Ben Ogle
919f541685
Merge pull request #3261 from atom/bo-default-react-mini
...
Default to the react mini editors
2014-08-15 11:16:28 -07:00
Nathan Sobo
2bd8456923
Preserve invisibles in editor model across serialization
...
Fixes #3281
2014-08-15 08:18:53 -06:00
Maximilian Schüßler
cbe5593381
Do not use "-> return" to mark empty function
2014-08-14 19:42:50 +02:00
Maximilian Schüßler
32e59ce238
Cleanup code according to coffeelint
2014-08-14 19:41:49 +02:00
Kevin Sawicki
776e431cc5
confirmCheckoutHead -> confirmCheckoutHeadRevision
2014-08-13 19:02:09 -07:00
Kevin Sawicki
00170804e5
Remove spec now covered in git spec
2014-08-13 18:51:19 -07:00
Kevin Sawicki
3ce641f53b
Move checkout head editor specs to git spec
2014-08-13 18:51:19 -07:00
Nathan Sobo
20daed176b
Don't show invisibles in mini editors
...
This moves observation of the config keys to Editor, which assigns the
invisibles hash or null on the TokenizedBuffer via the DisplayBuffer to
control whether we render invisibles or not.
2014-08-13 16:32:14 -06:00
Nathan Sobo
d37cfb9042
Assign default invisible character glyphs via config defaults
...
This commit also extends config.get to merge default values into the
returned object if both the assigned and default values are objects.
This allows 'atom.invisibles' to be treated as an object that always has
the default values filled in.
2014-08-13 16:32:13 -06:00
Nathan Sobo
986753981d
Use config defaults to assign default invisible characters
2014-08-13 16:32:13 -06:00
Nathan Sobo
970bde9361
Run animation frame after toggling invisibles in EditorComponent spec
2014-08-13 16:31:40 -06:00
Nathan Sobo
7b55946abf
Make Editor::moveCursorToFirstCharacterOfLine work with invisible chars
2014-08-13 16:31:40 -06:00
Nathan Sobo
c74f6bb615
Remove handling of invisibles from EditorComponent
2014-08-13 16:31:40 -06:00
Nathan Sobo
63f2ab3088
Render end-of-line invisibles based on state of TokenizedLine
2014-08-13 16:31:39 -06:00
Nathan Sobo
742ec6df0d
Determine the endOfLineInvisibles for each TokenizedLine
2014-08-13 16:31:39 -06:00
Nathan Sobo
864f9bc2b4
Preserve hasLeading/TrailingWhitespace when copying lines w/ invisibles
...
This fixes the styling of the leading whitespace of folded lines
2014-08-13 16:31:39 -06:00
Nathan Sobo
73896d100e
Add specs for firstNonWhitespaceIndex and firstTrailingWhitespaceIndex
2014-08-13 16:31:39 -06:00
Nathan Sobo
193001d793
Assign invisibles via config in editor-view-spec
2014-08-13 16:31:39 -06:00
Nathan Sobo
052f9580f2
Render correct classes on leading/trailing whitespace spans
2014-08-13 16:31:39 -06:00
Nathan Sobo
2daf70f0e5
Handle invisibles at the token level to fix char width measurement
...
Fixes #3188
2014-08-13 16:31:39 -06:00
Kevin Sawicki
fca9ed07e6
Merge pull request #3169 from lee-dohm/ld-checkout-head
...
Add confirmation dialog to checkoutHead
2014-08-13 15:24:06 -07:00
Ben Ogle
e725a8ffeb
Default to on in the specs
2014-08-13 14:51:05 -07:00
Ben Ogle
449da91216
Add toShow matcher
2014-08-13 13:42:46 -07:00
Ben Ogle
96804096e9
Fix specs
2014-08-12 15:44:58 -07:00
Ben Ogle
722d8cb48b
Need to return a range when the text is inserted
2014-08-12 15:30:19 -07:00
Ben Ogle
b037395551
Add will-insert-text
and did-insert-text
to insertText()
2014-08-12 15:28:26 -07:00
Ben Ogle
7de2ad34aa
Remove opaque backgrounds on mini editors
...
Fixes #3239
2014-08-12 14:53:09 -07:00
Kevin Sawicki
59d62d48db
Remove views and destroy project during unload
2014-08-12 08:49:28 -07:00
Kevin Sawicki
16d2e41309
Use beforeunload instead of unload
...
unload is asynchronous in Chrome 36 and so saving the state while
reloading may not happen before the state is read on the new render
process.
2014-08-12 08:49:28 -07:00
Lee Dohm
d6a8217e94
Add config option for checkoutHead confirmation
...
Per the discussion with @kevinsawicki in #3168 , I have added a config
option `editor.confirmCheckoutHead` that defaults to `true`. When the
`editor:checkout-head-revision` command is executed, a confirmation
dialog now shows that states which file is to be reverted and asks the
user to "Revert" or "Cancel". If the config option is set to `false`,
the old behavior, simply reverting without prompting, is used.
I also added tests to ensure that the confirmation dialog is displayed
or not in the right configurations.
2014-08-12 00:19:47 -07:00
Kevin Sawicki
f447781e01
Allow any bundled theme when in safe mode
...
Check enabled names against the bundled names and ensure
one bundled UI and one bundled syntax theme are enabled,
defaulting to the dark themes when necessary.
2014-08-11 15:24:49 -07:00
Maximilian Schüßler
c2304e1124
Fix indentation
2014-08-08 19:59:45 +02:00
Maximilian Schüßler
b463d9d876
Load the default themes in safe mode
2014-08-05 13:32:16 +02:00
Nathan Sobo
7e45ffa4c3
Center around the cursor in Editor::scrollToCursorPosition by default
...
Fixes #3131
2014-08-04 11:58:07 -06:00
Kevin Sawicki
f7187f1d5a
Spy on atom.inDevMode()
2014-07-31 08:42:31 -07:00
Nathan Sobo
a9bd061144
Un-f
2014-07-29 16:52:21 -06:00
Nathan Sobo
837eaccd16
Remove extra nextAnimationFrame call
2014-07-28 21:53:18 -06:00
Nathan Sobo
bd77a02207
Measure DOM in EditorComponent when a stylesheet is updated
2014-07-28 21:00:15 -06:00
Nathan Sobo
eebbb99fc8
Handle editor font config options with a global stylesheet
...
Previously, each editor observed font-related config values on its own
and applied inline styles to honor them. This made it difficult to style
the editor like a normal element with CSS.
Moving this to a global stylesheet that targets editors via the .editor
selector means that the font size setting can be overridden in specific
contexts, such as when using mini editors.
2014-07-28 21:00:15 -06:00
Nathan Sobo
393552a4b6
Take cursors off the GPU and position them on the lines layer
...
The compositor overhead is not worth it.
2014-07-27 11:47:33 -06:00
Nathan Sobo
444c18be34
Stop polling when an update is pending
2014-07-27 11:46:22 -06:00
Nathan Sobo
dca096b8e3
Use requestAnimationFrame to batch updates in Chrome 35
...
In Chrome 31, setImmediate was yielding better behavior. But now Chrome
35 seems to behave more smoothly when we use requestAnimationFrame, and
the delay for keystrokes is non-existent.
2014-07-27 11:46:22 -06:00
Kevin Sawicki
d47348e8f9
Cache incompatible modules in local storage
2014-07-25 15:34:03 -07:00
Kevin Sawicki
56df7bdbe3
Add version to package
2014-07-25 15:23:36 -07:00
Kevin Sawicki
1ea909d4db
Check installed packages for working native modules
...
Test require each native module in each installed package to make sure
it can be required successfully in Atom.
2014-07-25 15:19:16 -07:00
Nathan Sobo
7515fd94ba
Merge branch 'master' into chrome35
...
Conflicts:
package.json
2014-07-24 17:40:37 -07:00
Nathan Sobo
7738eeeacc
Give the line-numbers div an opaque background for better GPU perf
...
We sample both the background color of the editor and the gutter. If the
gutter has an actual background color, we use it. Otherwise we fall back
to the same background as the editor.
2014-07-24 17:23:04 -07:00
Nathan Sobo
c6116468e4
Apply background color of root editor node to lines as an inline style
...
This ensures lines have an opaque background that matches whatever the
editor is styled as, but avoids the need to apply the .editor-colors
class to the .lines div. That approach fell down when people were
setting the background color via means other than .editor-colors, such
as styling mini editors via the .editor.mini selector in the settings
view.
2014-07-24 16:54:01 -07:00
Nathan Sobo
2a2d0b60f7
💄
2014-07-24 16:41:25 -07:00
Cheng Zhao
dcbf730129
Merge branch 'master' into chrome35
...
Conflicts:
apm/package.json
package.json
2014-07-24 17:17:35 +08:00
Ben Ogle
00275d95ec
Merge pull request #3044 from atom/bo-h-scrollbar
...
Horizontal scrollbar no longer covers the gutter
2014-07-23 16:35:02 -07:00
Ben Ogle
242df788e6
Remove unnecessary scrollbar specs
2014-07-23 16:25:24 -07:00
Ben Ogle
3295b9b0dd
Romove runSetImmediateCallbacks() in many cases
...
This is because of the removal of the gutter measurement. When there
was measurement, every load of the editor would measure and request at
least one render based on the reset of the gutter width. These
specs don’t need to call runSetImmediateCallbacks() as they either
don’t do anything to cause a render or they render immediately
(in the case of updated options).
In some cases, we need to make sure nothing happened, so I added a
hasSetImmediateCallbacks() function, which is used in specs where
nothing should have happened.
2014-07-23 16:25:10 -07:00
Kevin Sawicki
adaee84933
Remove unused fixtures
2014-07-23 10:11:02 -07:00
Kevin Sawicki
84ff28ee69
Remove unused package fixtures
2014-07-23 10:11:01 -07:00
Kevin Sawicki
cfb1501720
Remove unused replication fixture
2014-07-23 10:11:01 -07:00
Ben Ogle
ffb041a160
Only render an nbsp on empty lines when no eol character defined
...
Fixes #3053
2014-07-23 09:30:52 -07:00
Ben Ogle
361f8ec770
Add specs for toggling the gutter when the editor is hidden
2014-07-22 18:26:58 -07:00
Ben Ogle
48a5123202
💄 Move logic into measureGutterIfNeeded
2014-07-22 18:26:58 -07:00
Ben Ogle
0f1d155685
Move gutterWidth into state; add specs for scrollbar position
2014-07-22 18:26:58 -07:00
Kevin Sawicki
5f7f5b5367
Merge branch 'master' into chrome35
2014-07-22 17:56:24 -07:00
Kevin Sawicki
bc4173f856
Remove logging of screen lines in spec
2014-07-22 14:51:13 -07:00
probablycorey
a3f046b948
Fix getVersion spec
2014-07-22 14:10:29 -07:00
Ben Ogle
17364cd528
Take the scrollbar width into account in specs
2014-07-22 11:54:26 -07:00
Nathan Sobo
5871bee791
Make spec assertions insensitive to scrollbars on Windows
2014-07-22 10:16:43 -07:00
Nathan Sobo
43c9e21f1d
Make setEditorHeightInLines/WidthInChars spec helpers work with React
...
Fixes #3019
2014-07-21 15:04:44 -07:00
Nathan Sobo
ca1220a682
Delay initial measurement until the editor becomes visible
...
Previously, these measurements were always performed when the editor
component was mounted. This didn't work in situations where the
component was mounted in a non-visible state. This commit includes a
visibility check in the resize polling we were already doing, kicking
off the measurement process as soon as the editor is visible.
2014-07-21 13:40:10 -07:00
Nathan Sobo
0346e5809a
Only prevent default on mousewheel events if editor actually scrolls
...
This prevents mini editors from capturing scroll events.
2014-07-21 10:43:31 -07:00
Nathan Sobo
99704517bb
Remove animation frame batching of mousewheel events
...
This doesn't seem to adversely affect the scroll experience, and it's
much simpler. I want to avoid preventing the default action of
mousewheel events if they don't actually lead to scrolling, and making
the behavior synchronous will make that a lot easier.
2014-07-21 10:43:31 -07:00
Nathan Sobo
783ef730e2
Rename EditorComponent::measureScrollView to ::measureHeightAndWidth
...
Since we also check if we're auto-height in this method, this name seems
like a better description of the objectives of this method.
2014-07-21 10:43:31 -07:00
Nathan Sobo
e81db5d706
Pull out EditorComponent::pollDOM method
...
This makes the actions that we perform in the poll loop explicit, and
will prevent the accumulation of polling-related behavior in the
::measureScrollView method.
2014-07-21 10:43:31 -07:00
Nathan Sobo
d0893ccdaf
Add placeholderText to React editors
2014-07-21 10:43:31 -07:00
Nathan Sobo
a9c7842a50
Don't render line decorations on mini editors
2014-07-21 10:43:31 -07:00
Nathan Sobo
544c759fd1
Don't set an explicit line height on mini editors
...
This allows the line height to be styled via CSS. I would actually
like to allow all these properties to be assigned via CSS rather than
explicitly via the settings view, but that can be deferred until the
old editor is removed.
2014-07-21 10:43:31 -07:00
Nathan Sobo
759dbc061d
Don't render invisible characters in React mini editors
2014-07-21 10:43:31 -07:00
Nathan Sobo
56c9f75e8c
Add the 'mini' class to the React wrapper view for mini editors
2014-07-21 10:43:30 -07:00
Nathan Sobo
635f288050
Explicitly assign height of editor-contents when height is auto
2014-07-21 10:43:30 -07:00
Nathan Sobo
cc8b7b13b3
Don't show the gutter when 'mini' is true on React editors
2014-07-21 10:43:30 -07:00
Nathan Sobo
e999ef00e7
Base editor dimensions on the wrapper view
...
The goal is to make the editor behave like a standard block-level
element.
The horizontal behavior is simple: we stretch horizontally to fill our
container.
The vertical behavior is more nuanced. If an explicit height is assigned
on the wrapper view, we honor that height. But if no explicit height is
assigned, the editor stretches vertically so that its contents are
visible.
This prepares us to support mini editors, which need to be 1-line tall
without an explicit height assignment.
2014-07-21 10:43:30 -07:00
Nathan Sobo
f16ea63a95
Export ReactEditorView as EditorView from 'atom' module
...
Also, remove a few early requires of 'exports/atom.coffee' in the spec
suite that were causing failures.
2014-07-21 10:43:30 -07:00
Nathan Sobo
cdb5fe15d2
Render nbsp on empty lines to ensure they have a non-zero height
...
Fixes #2958
2014-07-16 00:56:14 -07:00
Ivan Žužak
608c2b5354
Merge pull request #2977 from atom/iz-multiple-separators
...
Support multiple separators in context menu
2014-07-15 15:22:37 -07:00
Ben Ogle
cce49da18c
Fix spec
2014-07-15 08:44:58 -07:00
Ben Ogle
29e883cf36
Add specs
2014-07-15 08:44:21 -07:00
Ivan Zuzak
cd1a17fb0a
Support multiple separators in context menu
2014-07-14 17:10:13 -07:00
Lee Dohm
b100310764
Add failing test for #2274
...
Tested first on a branch off of `master` to ensure that it would
actually fail 😀
2014-07-13 13:27:32 -07:00
Ben Ogle
e620121953
Add spec for loading theme with incomplete variable file
2014-07-11 14:04:54 -07:00
Ben Ogle
9976166902
Render the line numbers after gutter mount
...
Fixes #2916
2014-07-10 17:25:58 -07:00
Nathan Sobo
7155ec4b73
Fix autoscroll specs for addSelectionForBufferRange
2014-07-09 08:06:14 -06:00
Nathan Sobo
e170b9f56b
Render line-ending invisibles on empty lines
...
Fixes #2857
Including correct interleaving with indent guides.
2014-07-08 16:53:06 -06:00
Corey Johnson
57ed190ea3
Merge pull request #2859 from atom/cj-windows-updater
...
Add autoUpdater shim for Windows
2014-07-08 12:52:45 -07:00
Ben Ogle
2b957beeda
💄 Fix ugly test
2014-07-08 11:18:47 -07:00
probablycorey
832aeffd4f
Add basic updater spec
2014-07-08 11:12:28 -07:00
Kevin Sawicki
5d08ecdcb2
Remove logging in specs
2014-07-08 10:57:22 -07:00
Nathan Sobo
997529774c
Clean up after stylesheet applications in editor-component-spec
2014-07-08 11:55:50 -06:00
Nathan Sobo
48d20ff1ec
Only remeasure char widths on stylesheet changes if editor is visible
...
Fixes #2856
2014-07-08 11:46:23 -06:00
Ben Ogle
eda55156e5
Merge pull request #2819 from atom/bo-decoration-api
...
Update the decoration API
2014-07-07 18:06:35 -07:00
Ben Ogle
ce1ebec253
Fix specs
2014-07-07 17:48:24 -07:00
Nathan Sobo
2878196e0a
Make React editor indent guide work like it did in the old editor
...
Fixes #2367
* The indent level of empty lines is the *max* of the nearest non empty
line, rather than favoring the level of the line below.
* An extra wrap guide is no longer rendered for empty lines
I didn't port the specs over because we already had good coverage at the
model level. It just needed to be updated for the preferred behavior.
2014-07-07 17:59:26 -06:00
Ben Ogle
d7a3ffa9de
Handle Decoration::update
2014-07-07 15:13:04 -07:00
Nathan Sobo
18ed91a402
Merge pull request #2852 from atom/ns-react-remeasure-characters-on-stylesheet-change
...
Re-measure character widths when stylesheets change
2014-07-07 15:47:29 -06:00
Ben Ogle
e991b3d10c
Move from addDecoration
-> decorateMarker
2014-07-07 14:43:56 -07:00
Nathan Sobo
e1e510e473
Re-measure character widths when stylesheets change
...
Fixes #2845
2014-07-07 15:39:00 -06:00
Nathan Sobo
d042d15a50
Autoscroll to cursor on undo
...
Fixes #2815
This commit changes our autoscroll strategy for cursors significantly.
Originally, we were autoscrolling whenever the cursor's marker changed
positions. This worked well, except we didn't end up autoscrolling when
the user *attempted* to move the cursor to an invalid position, such as
moving down at the end of the buffer, due to the fact that the marker
wouldn't change.
Then, we moved to always requesting an autoscroll whenever a position
change was requested via Cursor::changePosition. This missed out on
moving the cursor when inserting text, so we then also added an explicit
autoscroll call when inserting text.
This had the problem of not autoscrolling due to undo. So finally, this
solution combines explicit autoscroll in ::changePosition to capture
intent, as well as implicit autoscrolling whenever the cursor's marker
position changes due to a textual change in the buffer. This captures
undo/redo correctly.
2014-07-07 15:21:48 -06:00
Nathan Sobo
fad2a63a14
Account for padding-left on the scroll view when soft-wrapping lines
...
Fixes #2844
2014-07-07 14:02:24 -06:00
Nathan Sobo
2de42303d4
💄
2014-07-07 13:55:32 -06:00
Nathan Sobo
673b62f547
Scroll React editor all the way left when soft wrap is enabled
...
Fixes #2842
2014-07-07 12:26:33 -06:00
Kevin Sawicki
0aa5fa9eeb
Increase timeout on Windows CI
2014-07-07 10:14:38 -07:00
Kevin Sawicki
2e554ac819
Use cross platform path in Project::replace spec
2014-07-05 10:01:19 -07:00
Nathan Sobo
7ac8b80172
Explicitly test removal of flash class prior to next animation frame
2014-07-04 09:56:51 -06:00
Ben Ogle
48b6c24882
Add Editor::selectionFlashDuration rather than magic number
2014-07-03 17:36:45 -07:00
Ben Ogle
e5f800ef35
💄
2014-07-03 17:32:38 -07:00
Ben Ogle
492022fdd8
Fix spec
2014-07-03 17:32:38 -07:00
Ben Ogle
abbe8d2eec
Flash works for selections
2014-07-03 17:32:37 -07:00
Ben Ogle
bf33d96899
Decorations can be flashed
2014-07-03 17:32:37 -07:00
Ben Ogle
80eb31679f
Add a Decoration object. Rework to use this object
2014-07-03 17:32:37 -07:00
Nathan Sobo
c2b7955ec6
Adjust DisplayBuffer::longestScreenRow when lines are inserted/removed
...
Fixes #2810
The line corresponding to the longest screen row moves when lines are
inserted or removed above it, so we need to adjust it accordingly or we
won't always realize when a change affects the longest line.
2014-07-03 16:15:49 -06:00
Nathan Sobo
9ece33dbfe
Handle double and triple click with command key held down
...
Fixes #2812
2014-07-03 15:18:53 -06:00
Nathan Sobo
260be2e096
Autoscroll *after* inserting text, not before
...
Fixes #2787
2014-07-03 14:47:43 -06:00
Nathan Sobo
a4ed02c3c5
Update lines for line insertions/removals preceding rendered row range
2014-07-03 11:22:57 -06:00
Nathan Sobo
66319ca9c0
Merge pull request #2801 from atom/ns-react-fix-jitter
...
Fix jitter in React editor
2014-07-02 10:34:01 -06:00
Nathan Sobo
17fa580ecd
Ignore 'scroll' events when an update is pending
...
This prevents feedback loops where we handle stale 'scroll' events
for scrolls requested in the model layer. It prevents jitter when
autoscrolling with the cursor.
2014-07-02 10:11:35 -06:00
Nathan Sobo
9508909a9f
Don't defer updates with setImmediate in animation frames
...
I previously thought this was okay, but now I'm experiencing jitter when
scrolling with the trackpad when updates are deferred, and the frames
seem jagged. So this commit restores a synchronous approach to display
updates whenever we use animation frames.
2014-07-02 09:26:24 -06:00
Ben Ogle
1fa6661efd
Remove the awkward _.pick
2014-07-01 11:48:36 -07:00
Ben Ogle
dcb0d9b039
Update editor component specs
2014-07-01 11:41:44 -07:00
Ben Ogle
718e1228bd
Add checks for the change event
2014-07-01 11:32:04 -07:00
Ben Ogle
3e57fb8e9a
💄 naming
2014-07-01 10:59:42 -07:00
Ben Ogle
de0e945c5c
More specs in tokenized buffer testing empty line retokenizing
2014-07-01 10:54:37 -07:00
Ben Ogle
65c2f26656
Little note 📝
2014-07-01 10:54:36 -07:00
Ben Ogle
8ca709eb6a
Fix spec name
2014-07-01 10:54:36 -07:00
Ben Ogle
43e88f6515
Invalidate whitespace lines when their indent level changes
...
Refs #2376
2014-07-01 10:54:36 -07:00
Ben Ogle
d97eacc2f9
Add isOnlyWhitespace()
2014-07-01 10:54:36 -07:00
Ben Ogle
06d06d10e0
💄
2014-07-01 10:45:13 -07:00
Ben Ogle
44b95fc637
Emit errors from the out of process searches
2014-07-01 10:44:30 -07:00
Nathan Sobo
e93e4e9333
Autoscroll to the last cursor in model when inserting text
...
Fixes #2787
2014-07-01 11:37:17 -06:00
Nathan Sobo
d4a7bff525
Merge pull request #2608 from philschatz/ps-dedupe-context-menu
...
remove duplicate context menu entries
2014-07-01 11:08:18 -06:00
Nathan Sobo
a99bde4e2d
Reassign scrollTop if deleting lines decreases the max scrollTop
...
Fixes #2725
2014-07-01 09:01:04 -06:00
Nathan Sobo
15ca3e2a40
Match existing editor's behavior for .cursor-line class
2014-06-28 15:39:22 +01:00
Nathan Sobo
ea9f5eb1c7
💄 Unify specs for all line decorations
2014-06-28 15:39:22 +01:00
Nathan Sobo
7f70b41696
Update the specs for .cursor/selection-line decorations
2014-06-28 15:39:22 +01:00
Nathan Sobo
bd238d6885
Add specs for gutter decoration options
...
- onlyHead
- onlyEmpty
- onlyNonEmpty
2014-06-28 15:39:22 +01:00
Nathan Sobo
fa7e388352
Add 'onlyEmpty' and 'onlyNonEmpty' decoration options
2014-06-28 15:39:21 +01:00
Nathan Sobo
a2b90cd501
Add 'onlyHead' option for decorations
...
It only decorates the head position of the decoration's marker.
2014-06-28 15:39:21 +01:00
Nathan Sobo
71fb063a67
Un-f
2014-06-28 15:24:24 +01:00
probablycorey
e7aef25f1f
Update tokenized buffer specs
2014-06-27 10:18:04 -07:00
probablycorey
071b391994
Describe surrogate pair as UTF-8 surrogate pair
2014-06-27 10:17:28 -07:00
Ben Ogle
7179bc5af1
Merge pull request #2738 from atom/bo-fix-max-scroll-width
...
Fix max scroll width in react editor
2014-06-25 18:16:32 -07:00
Nathan Sobo
3bf0c73170
Assign line width explicitly to prevent full screen repaints
...
Fixes #2746
2014-06-25 19:13:50 -06:00
Nathan Sobo
eb84737109
Fix specs for use of setImmediate instead of nextTick in requestUpdate
2014-06-25 18:38:06 -06:00
Nathan Sobo
63e8099088
Allow successive accented characters to be inserted in React editor
...
Refs #2732
Because we're only checking the length of the input element's selection
in the React editor on textinput events and not also its content, we
were mistaking some IME compositions as accented character menu
insertions. Clearing the content of the input on 'compositionend'
prevents this issue.
2014-06-25 18:19:53 -06:00
Ben Ogle & Nathan Sobo
f739dce210
Only recompute scroll width once for each batch of measured chars
2014-06-25 15:26:13 -07:00
Ben Ogle & Nathan Sobo
77389b0518
Update scrollWidth when the max line length / default char width changes
2014-06-25 15:26:13 -07:00
Ben Ogle
196f64d846
Fix specs
2014-06-25 15:26:13 -07:00
Ben Ogle
b7d8e581ee
Merge pull request #2727 from atom/bo-subscribe-to-marker-changes
...
Subscribe to marker changes
2014-06-24 11:15:47 -07:00
Ben Ogle
396b21bc04
Fix specs failures caused by making lines 100% width
2014-06-24 10:32:48 -06:00
Kevin Sawicki
1c2e997415
Merge pull request #2700 from atom/bo-grammar-preload
...
Preload grammars on deserialization
2014-06-24 08:26:57 -07:00
Kevin Sawicki
148b691734
Test grammars included across multiple packages
2014-06-24 08:14:11 -07:00
Ben Ogle
ccada33d57
Remove nextTick in spec
2014-06-23 22:27:40 -06:00
Ben Ogle
1d9514ca81
Don't call nextTick within requestAnimationFrame
...
This seems to be causing stutter when scrolling on the GPU. When I don't
use nextTick when requesting animation frames, the problem seems to go
away. Maybe there's some issue with the integration between the Node
and Chromium event loops plus sending things to the compositor.
/cc @benogle
2014-06-23 22:21:28 -06:00
Kevin Sawicki
2e424baf2a
Use correct expected call count
2014-06-23 17:41:33 -07:00
Kevin Sawicki
0547d5a78b
Assert grammars are sync loaded on deserialize
2014-06-23 17:36:14 -07:00
Kevin Sawicki
0a54233ef0
Merge branch 'master' into bo-grammar-preload
2014-06-23 17:05:48 -07:00
Kevin Sawicki
e11785ce98
Serialize packages names in Workspace
2014-06-23 16:56:46 -07:00
Kevin Sawicki
b1d7de8d43
Add spec for serializing active grammars
2014-06-23 16:41:46 -07:00
Ben Ogle
f381abcbad
Re-render when a marker changes
...
fixes #2705
2014-06-23 16:00:36 -07:00
Ben Ogle
7139fd9f98
Conditionally render the gutter for the showLineNumbers option
...
Fixes #2707
2014-06-23 15:22:16 -07:00
Nathan Sobo
b9a3eca091
Correcly handle folds that end where other folds begin
...
Fixes #2247
2014-06-23 11:29:14 -06:00
probablycorey
9a5da3c27e
Add next tick call
2014-06-23 09:13:39 -07:00
probablycorey
43cb9af4a4
Add editor-event spec
2014-06-23 08:51:17 -07:00
Nathan Sobo
7c356d2592
Revert "Render highlights on their own layer to avoid GPU artifacts"
2014-06-21 01:58:11 -06:00
Nathan Sobo
e49414d2ec
Merge pull request #2699 from atom/ns-react-fix-artifacts
...
Render highlights on their own layer to avoid GPU artifacts
2014-06-20 17:03:26 -06:00
Nathan Sobo
e084bebb54
Autoscroll to selections in model layer when added
...
Fixes #2698
2014-06-20 16:53:46 -06:00
Nathan Sobo
d839ea9aa5
Don't render an opaque background behind line numbers
...
It doesn't help subpixel anti-aliasing like I thought, so screw it.
2014-06-20 16:07:19 -06:00
Nathan Sobo
68d0a99c6e
Default EditorComponent to updating synchronously in specs
...
This commit adds a static property, EditorComponent.performSyncUpdates,
which can be used to control the update behavior of all editor
components. In addition, an instance property called performSyncUpdates
be assigned to control the update behavior of a specific instance.
2014-06-20 15:06:16 -06:00
Nathan Sobo
64f3938f5c
Batch all editor updates together automatically via process.nextTick
2014-06-20 15:06:10 -06:00
Kevin Sawicki
4136ff566b
📝 Correct spec description
2014-06-20 13:09:51 -07:00
Kevin Sawicki
2fe523a664
Add spec for Editor::selectPageUp/Down
2014-06-20 13:09:51 -07:00
Ben Ogle
72b1821828
Render line decorations.
2014-06-19 17:20:05 -07:00
Philip Schatz
67a1ed92db
💄 context menu tests
2014-06-19 19:14:34 -04:00
Ben Ogle
85abed2406
Merge pull request #2676 from atom/bo-cursor-gutter
...
Don’t render decorations on the last empty line when selection not empty
2014-06-19 15:10:18 -07:00
Ben Ogle
520ece4b13
💄 Wording
2014-06-19 15:09:49 -07:00
Ben Ogle
184068dc55
Add handlers for IME composition
2014-06-19 15:03:34 -07:00
Ben Ogle
908a2978ae
Don’t render decorations on the last empty line when selection not empty
2014-06-19 14:20:32 -07:00
Ben Ogle
bee4c9df8a
Revert "Select to the end of the last row rather than beginning of row + 1"
...
This reverts commit c5815d2af9
.
2014-06-19 12:06:09 -07:00
Ben Ogle
c5815d2af9
Select to the end of the last row rather than beginning of row + 1
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
8295019891
Throw error when no animation frame was requested
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
2edcc517b1
Handle dragging in the gutter
...
Including shift-click dragging better than the old editor!!!!!!
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
9083103bb3
Add click and shift-click in gutter
2014-06-19 12:04:36 -07:00
Ben Ogle & Nathan Sobo
bc391094df
💄 Move helper
2014-06-19 12:03:18 -07:00
Kevin Sawicki
1e1f4cf173
Merge pull request #2662 from atom/ks-align-hard-tabs
...
Align hard tabs
2014-06-19 09:41:15 -07:00
Nathan Sobo
388763e7cd
Wait to measure characters if editor is hidden
...
Also, when characters *are* measured, request a display update
2014-06-19 04:19:51 -06:00
Nathan Sobo
f22e4225c3
Break into separate specs for lineHeight, fontSize, and fontFamily
2014-06-19 03:35:35 -06:00
Nathan Sobo
17f9cc49f2
Honor the center: true
option in scrollTo* methods
...
Fixes #2648
2014-06-18 21:48:14 -06:00
Kevin Sawicki
fe2cb046c3
Verify token screen and buffer delta
2014-06-18 17:26:38 -07:00
Kevin Sawicki
355f54ba00
Test odd-numbered tab length alignment
2014-06-18 17:10:10 -07:00
Kevin Sawicki
b56d4c6181
Update more expected tab lengths
2014-06-18 16:54:56 -07:00
Kevin Sawicki
ad9e2ab869
Update specs where tab is now only 1 space
2014-06-18 16:48:00 -07:00
Kevin Sawicki
c4c5d72bf1
Test multiple tab stops per line
2014-06-18 16:37:23 -07:00
Kevin Sawicki
0504244066
Test multiple tab lengths
2014-06-18 16:25:31 -07:00
Kevin Sawicki
8560526158
Add initial spec of hard tabs aligning
2014-06-18 16:24:35 -07:00
Ben Ogle
02757fc2de
💄
2014-06-18 14:22:05 -07:00
Ben Ogle
d5ea766541
Make click of fold marker unfold the row
2014-06-18 14:07:55 -07:00
Ben Ogle
7a9710b8c3
Add fold markers to folded lines
...
Fixes #2634
2014-06-18 13:47:38 -07:00
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
Philip Schatz
624c0bf9f1
allow multiple labels for the same command
2014-06-17 23:36:59 -04: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
Philip Schatz
2fdcf7a124
remove duplicate context menu entries
2014-06-13 21:30:55 -04: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