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
Nathan Sobo
ee233d56a7
Remove unused autoscrollOnAttach
flag from CursorView
...
We no longer call `updateDisplay` immediately when the cursor is attached. Instead, we always attach and remove cursor views from `Editor#updateDisplay`, so we will decide whether to autoscroll at that level.
2012-11-13 15:08:44 -07:00
Nathan Sobo
f96cf439c0
Adding/removing SelectionView
s through Editor#updateDisplay
2012-11-13 15:06:32 -07:00
Nathan Sobo
c09249313b
Only add CursorViews
during Editor#updateDisplay
...
The goal is that no model operation will ever modify the DOM directly. We will always request a display update, which will happen on the next animation frame.
2012-11-13 14:54:59 -07:00
Nathan Sobo
8aad2480b6
Only autoscroll to cursor when it is attached *after* reset
2012-11-13 14:30:24 -07:00
Nathan Sobo
bfef9077f3
Don't autoscroll when updating the display after adjusting scrollTop
2012-11-13 14:18:51 -07:00
Nathan Sobo
55bab0fbe0
Un F
2012-11-13 14:18:12 -07:00
Corey Johnson & Nathan Sobo
b5efec308a
wip: updateDisplay
2012-11-13 12:08:41 -08:00
Corey Johnson & Nathan Sobo
9c0f1d428f
Rename updateAppearance to updateDisplay
2012-11-13 11:21:46 -08:00
Corey Johnson
bb9c2e1bcb
Handle exceptions thrown during do/undo/redo
2012-11-12 15:59:44 -08:00
Corey Johnson
1d3a26e253
Fix other WrapGuide specs
2012-11-12 09:31:54 -08:00
Corey Johnson
885717864e
Place WrapGuide on the Editor's underlayer element (instead of on lines)
2012-11-12 09:19:07 -08:00
Corey Johnson
e9f69ee203
EditSession.isFoldedAtScreenRow returns false for screen rows that do not exist.
2012-11-12 09:12:47 -08:00
Corey Johnson
448060a619
rake test
kills all existing Atom processes
...
Existing Atom processes were causes false positive ci builds.
2012-11-12 08:44:16 -08:00
Corey Johnson
1f7b92495a
fix failing spec
2012-11-09 16:10:53 -08:00
Corey Johnson
0bb384d98b
Atom is sent to the foreground when launched from the command line.
2012-11-09 15:51:24 -08:00
Corey Johnson
f09a104524
Treat $base in textmate grammars as if it is $self
...
$base works as $self worked previously. $self will need to be fixed. If inside
a embedded grammar $self refers to the embedded grammar while $base refers to the
overall grammar.
2012-11-09 15:35:40 -08:00
Nathan Sobo
06204a40dd
Un-F. 2 failures left in suite.
2012-11-09 14:27:19 -07:00
Nathan Sobo
3bc11ede77
Set the lines div height explicitly so it can be > 100% of parent
...
All editor specs pass
2012-11-09 14:25:59 -07:00
Nathan Sobo
c257a989be
Account for 20 extra pixels on right of lines div in spec
2012-11-09 14:05:22 -07:00
Nathan Sobo
538c44f82b
Fix bug caused by the fact that 0 <= null ===> true
. God. damn. it.
2012-11-09 14:02:13 -07:00
Nathan Sobo
ee9ae449f3
💄
2012-11-09 13:43:28 -07:00
Nathan Sobo
0b9e22483e
Update spec to match stricter maintenance of lastRenderedScreenRow
2012-11-09 13:40:49 -07:00
Nathan Sobo
5519929d8e
Kill console.log
2012-11-09 13:38:27 -07:00
Nathan Sobo
4a3dbedb71
Fix spec to allow for 20 extra pixels to right of the lines
2012-11-09 13:28:51 -07:00