Commit Graph

4080 Commits

Author SHA1 Message Date
Corey Johnson
61aecfa58f Backfill specs for SelectList 2012-11-16 11:34:52 -08:00
Corey Johnson
046233cf28 Remove 💩 code 2012-11-16 11:21:24 -08:00
Corey Johnson
22f3397af2 Display error when no tags are found for a file. 2012-11-16 11:10:11 -08:00
Corey Johnson
040575f0ae Add error div to select-list 2012-11-16 11:04:56 -08:00
Corey Johnson
749f1a536f Use outline-view:toggle to test OutlineView functionality 2012-11-16 10:30:09 -08:00
Corey Johnson
bc95ae9f3e Don't assume there is a rootView in window.reload
This was causing an error when specs where reloaded.
2012-11-16 09:47:32 -08:00
Nathan Sobo
61ce3b0f1a Simplify TokenizedBuffer#handleBufferChange for row-oriented events
Only talking about rows, instead of both rows and columns makes everything a lot simpler.
2012-11-16 09:23:36 -07:00
Nathan Sobo
a441ddec7c Make TokenizedBuffer emit row-oriented change events 2012-11-16 08:57:59 -07:00
Nathan Sobo
f7b1f0521a Emit row-oriented events from DisplayBuffer 2012-11-16 07:36:36 -07:00
Nathan Sobo
6a4f2a4478 💩 Forgot to commit the cursor blink stylesheet!
Sorry. It will blink correctly now.
2012-11-16 07:36:35 -07:00
Nathan Sobo
ea2e025400 Simplify DisplayBuffer's change event handling 2012-11-16 07:36:35 -07:00
Nathan Sobo
cf4e87103e Emit row-oriented screen lien change events from EditSession 2012-11-16 07:36:35 -07:00
Nathan Sobo
841e34090b Rename from/to to start/end in Editor's queued change events 2012-11-16 07:36:35 -07:00
Nathan Sobo
8ef8924871 💄 2012-11-16 07:36:35 -07:00
Corey Johnson
5bdfc49f3f Window's title matches TextMate pattern of "#{basename} – #{project.path}" 2012-11-15 17:08:37 -08:00
Corey Johnson
765fedaf42 Force TreeView spec to wait until the file events have been handled.
Without this, the wrong files where being unwatched.
2012-11-15 16:16:05 -08:00
Corey Johnson
7f999f4a96 Store the RootView's title as a member var instead of on document.title.
Now the window title is mocked to remain static when the spec suite is run.
2012-11-15 15:55:37 -08:00
Corey Johnson
69e04d57aa Remove NSLogs from PathWatcher 2012-11-15 14:37:49 -08:00
Corey Johnson
173a615f07 Clean up PathWatcher
Uses the path to store the callback instead of the fd. This
2012-11-15 14:31:49 -08:00
Corey Johnson
18f4134e81 Remove existing PathWatcher when window is reloaded or closed 2012-11-15 13:16:13 -08:00
Corey Johnson
0149012efc Deactivate RootView before removing files.
To limit the amount of fs events that are triggered.
2012-11-15 13:16:12 -08:00
Corey Johnson
d9a3fbd910 BufferSpec doesn't double release buffers 2012-11-15 13:16:12 -08:00
Nathan Sobo
5803332501 Allow specs results to be scrolled
I added overflow hidden on the html and body tags in a previous commit to prevent rubber banding when scrolling the editor. But it broke the ability to scroll specs. This fixes that.
2012-11-15 13:52:29 -07:00
Nathan Sobo
a1cff240b6 Use 'blink-off' css class to blink the cursor when editor is focused
Rather than managing the visibility directly, a class makes it easy. The cursors will always be toggling this class on and off in the background, but only on the focused editor will it actually have an effect.
2012-11-14 21:43:06 -07:00
Nathan Sobo
0af952fc13 💄 2012-11-14 21:42:03 -07:00
Nathan Sobo
e47cc1256d Don't blink the cursor if it should not be visible
Also, when stopping blinking, set the cursor's visibility to whatever it is on the underlying model. This fixes issues where the cursor would blink when there was a selection.
2012-11-14 21:21:48 -07:00
Nathan Sobo
1acde4f534 Merge pull request #97 from github/batch-screen-updates
Update the screen once per keystroke, and make typing faster
2012-11-14 20:03:02 -08:00
Nathan Sobo
1f1243a839 Merge branch 'master' of https://github.com/github/atom 2012-11-14 20:54:46 -07:00
Nathan Sobo
23ab4c193c Merge remote-tracking branch 'origin/master' into batch-screen-updates 2012-11-14 20:54:22 -07:00
Nathan Sobo
6a5b66a687 💄 2012-11-14 20:51:59 -07:00
Nathan Sobo
185ca22488 Make cursor blink by changing CSS visibility with setInterval
This is actually more efficient than the CSS animation we were doing previously, because it doesn't force the cursor to be sampled at 60 FPS for something that changes around twice a second.
2012-11-14 20:43:34 -07:00
Nathan Sobo
5dea68bb4c Status bar only updates modified flag after buffer *stops* changing 2012-11-14 15:34:11 -07:00
Nathan Sobo
4a84c5f8f9 Add 'stopped-changing' event to buffer. Fires 300ms after last change.
This will be used by the status bar and other expensive code that needs to respond to the buffer changing, but that we don't want running on every single keystroke when the user is typing quickly.
2012-11-14 15:33:44 -07:00
Nathan Sobo
632bba5609 Kill dead code in spec 2012-11-14 15:13:50 -07:00
Nathan Sobo
00a6472a2c Update display synchronously when scrolling to prevent flicker 2012-11-14 15:10:05 -07:00
Nathan Sobo
7f8e2643f5 Auto-scroll last to avoid forcing a reflow before we're done modifying 2012-11-14 15:04:13 -07:00
Nathan Sobo
28a937089f Trigger 'cursor-move' events when cursor view changes 2012-11-14 14:35:08 -07:00
Nathan Sobo
9424674b37 Trigger 'selection-change' events when selection view changes 2012-11-14 14:34:52 -07:00
Nathan Sobo
a6e928d85a Use MessageChannel-based nextTick to schedule Editor display update
This is the fastest way I've found to get the nextTick behavior, which allows us to aggregate multiple requests for display update (from selection changes, cursor movement, line changes) etc into a single call at the end of processing an event.
2012-11-14 13:57:27 -07:00
Nathan Sobo
5a1a1da386 Make editor display updates synchronous in all specs 2012-11-14 13:13:57 -07:00
Nathan Sobo
3e11b38eaf Disable spec for cursor idle class. We're going to blink it manually. 2012-11-14 13:13:39 -07:00
Nathan Sobo
3eeb4435a5 Re-render the gutter on changes if the screen or buffer delta are != 0
Basically, we don't re-render the gutter for single-line edits. Every other kind of change does re-render it however.
2012-11-14 13:13:23 -07:00
Nathan Sobo
c68d5fac7d Attach precipitating bufferChange to DisplayBuffer change events
The gutter can use this to determine if the change might have altered line numbers, for example if it's inside a fold.
2012-11-14 13:07:42 -07:00
Corey Johnson & Nathan Sobo
3b70df87a7 Remove cursor animation, which slows down screen updates when typing 2012-11-14 11:14:08 -07:00
Corey Johnson & Nathan Sobo
9fa577f8c4 Using requestAnimationFrame with some disabled features
Not sure if it feels faster, but the code is a bit more organized at least.
2012-11-13 18:25:29 -07:00
Corey Johnson & Nathan Sobo
8959adc13d Use updateDisplay instead of renderLines in autocomplete spec 2012-11-13 17:25:51 -07:00
Corey Johnson & Nathan Sobo
97e3a8f248 Lipstick 2012-11-13 17:23:19 -07:00
Corey Johnson & Nathan Sobo
2aed267752 Don't call updateDisplay re-entrantly from scrollTop 2012-11-13 17:23:09 -07:00
Corey Johnson & Nathan Sobo
041dc2b6b0 Replace calls to renderLines w/ resetDisplay in Editor 2012-11-13 17:21:27 -07:00
Corey Johnson & Nathan Sobo
cef9ce6ca7 Add needsUpdate and needsAutoscroll properties to cursor views
Then in the editor, we update and autoscroll only the views that need it. Autoscrolling is suppressed when resetting the display so that we honor the scroll positions of the active EditSession.
2012-11-13 17:20:48 -07:00