Commit Graph

15142 Commits

Author SHA1 Message Date
Corey Johnson
2ceccf5239 Exclude EditorViews that are mini editors from WorkspaceView::eachEditorView
Fixes #1900
v0.92.0
2014-04-24 09:26:04 -07:00
Nathan Sobo
ad8bd98c9a Don't overwrite the file-scoped path variable 2014-04-24 10:13:01 -06:00
Nathan Sobo
6c4e138ec0 Upgrade to language-ruby@0.23.0 2014-04-24 09:52:45 -06:00
Kevin Sawicki
9ad1021c2d Upgrade to settings-view@0.111.0 2014-04-23 18:14:18 -07:00
Nathan Sobo
aeb5a84696 Do render indent guides for tokens with leading whitespace 2014-04-23 17:04:20 -06:00
Nathan Sobo
228836447c Only render trailing whitespace indent guides on whitespace-only lines
Fixes #1895
2014-04-23 16:58:10 -06:00
Kevin Sawicki
b760d3e4fc Upgrade to markdown-preview@0.65.0 2014-04-23 13:21:51 -07:00
Nathan Sobo
1d634e471e Revert "Don't obscure the last line of the editor with the horizontal scrollbar"
This reverts commit babbdbf9e5.
2014-04-23 14:03:33 -06:00
Nathan Sobo
babbdbf9e5 Don't obscure the last line of the editor with the horizontal scrollbar
This assumes the scrollbar is 15px high, which is incorrect when using
overlay scrollbars or when the scrollbar is styled to have a different
height. We'll need to measure it in a subsequent commit.
2014-04-23 13:59:35 -06:00
Nathan Sobo
e9d820e8a8 💄 GutterComponent 2014-04-23 13:59:35 -06:00
Nathan Sobo
16e05347a7 Remove unneeded componentWillUnmount method
It's defined in the SubscriberMixin
2014-04-23 13:59:35 -06:00
Kevin Sawicki
2574ee5936 Prepare 0.92.0 release 2014-04-23 12:02:36 -07:00
Nathan Sobo
283966dbb9 Only autoscroll selections in the model when managing scroll position v0.91.0 2014-04-23 12:42:02 -06:00
Kevin Sawicki
f8727ffa6f Store compile cache in ~/.atom/compile-cache 2014-04-23 10:59:23 -07:00
Kevin Sawicki
1f31918373 Upgrade to pathwatcher 1.2.1 for empty file fix 2014-04-23 09:35:08 -07:00
Nathan Sobo
104aa5efc7 Merge pull request #1883 from atom/ns-react-editor-view
React Editor View, Take 2
2014-04-23 10:06:00 -06:00
Nathan Sobo
7fe0f5b445 Make parameter names explicit in delegators 2014-04-23 09:56:49 -06:00
Kevin Sawicki
c1260d68bb Restore window when opening path
Previously the window would stay minimized if it was triggered
from the command line and was already open.

Closes #1889
2014-04-22 16:58:53 -07:00
Kevin Sawicki
08748b5bad Upgrade to tabs@0.37.0 2014-04-22 16:48:55 -07:00
Nathan Sobo
752aa9a8e9 Handle editor:page-up/down commands 2014-04-22 17:10:23 -06:00
Nathan Sobo
e4639281f8 Handle 'editor:scroll-to-cursor' command
Add Editor::scrollToCursorPosition in the model layer
2014-04-22 17:10:23 -06:00
Nathan Sobo
f53d489abb Add DisplayBuffer::scrollToScreen/BufferPosition
Also add delegators in Editor and ReactEditorView
2014-04-22 17:10:23 -06:00
Nathan Sobo
628c2f82bd Add scrollTop/scrollLeft shims to ReactEditorView 2014-04-22 17:10:23 -06:00
Nathan Sobo
df8a6437a5 Set appended view to 'position: absolute' in ::appendToLinesView 2014-04-22 17:10:22 -06:00
Nathan Sobo
1f768a21f0 Update absolute position of lines and line numbers when text changes
When lines are inserted or removed, we need to manually shift the
on-screen lines since everything is absolutely positioned now.
2014-04-22 17:10:22 -06:00
Nathan Sobo
b13385b281 Subscribe to focus events with DOM api to prevent bubbling behavior
Using React's onFocus property, focus events seemed to bubble when
editors inside the editor were focused, as is the case with the
autocomplete menu.
2014-04-22 17:10:22 -06:00
Nathan Sobo
68d74e7de0 Put the hidden input component on its own layer
This avoids combining its repaint with the scrollbar's cursor position
when the cursor moves.
2014-04-22 17:10:22 -06:00
Nathan Sobo
c730e3c67e Ensure selections span the entire screen, even when lines are short
Also, pass scrollHeight and scrollWidth as props to child components
instead of calling the method to compute them in multiple components.
2014-04-22 17:10:22 -06:00
Nathan Sobo
22496ceeb1 WIP: Minimize paint when scrolling and composite lines with the GPU 2014-04-22 17:10:22 -06:00
Nathan Sobo
a03f2f46ee Don't assume tokens match text nodes when measuring character widths 2014-04-22 17:10:22 -06:00
Nathan Sobo
afec8f1ca0 Account for height of hidden input when positioning it 2014-04-22 17:10:22 -06:00
Nathan Sobo
43e6fb73f1 Focus react editor on attachment if it had focus previously 2014-04-22 17:10:22 -06:00
Nathan Sobo
a271e52a4e Never assign a 0 height or width when measuring editor scroll view 2014-04-22 17:10:22 -06:00
Nathan Sobo
274ca33959 Don't measure height and width unless component is mounted
Since we measure in requestAnimationFrame, it's possible to request
measurement prior to be unmounted and have it occur afterward.
2014-04-22 17:10:22 -06:00
Nathan Sobo
10d6ec156f Unsubscribe EditorComponent before unmounting 2014-04-22 17:10:22 -06:00
Nathan Sobo
4e27e765d0 Measure width and height when window size changes
Since overflowchanged events are paused for a bit after updates to
prevent thrashing, this ensures the editor is still updated promptly
when resizing.
2014-04-22 17:10:22 -06:00
Nathan Sobo
168cda4f75 Pause measurement on overflowchanged during updates
Content updates trigger overflowchanged, but we're mainly using it to
detect when the editor component has been resized. Pausing measurement
during content updates makes them faster.
2014-04-22 17:10:21 -06:00
Nathan Sobo
fdccc0bcc2 Measure DOM dimensions before rendering elements that depend on them
This commit breaks the initial render of the editor component into two
stages.

The first stage just renders the shell of the editor so the height,
width, line height, and default character width can be measured. Nothing
that depends on these values is rendered on the first render pass.

Once the editor component is mounted, all these values are measured and
we force another update, which fills in the lines, line numbers,
selections, etc.

We also refrain from assigning an explicit height and width on the
model if these values aren't explicitly styled in the DOM, and just
assume the editor will stretch to accommodate its contents.
2014-04-22 17:10:21 -06:00
Nathan Sobo
d566726b9f Use negative z-indices so attached views are visible in react editor 2014-04-22 17:10:21 -06:00
Nathan Sobo
e9f2a536ed Add more shims to ReactEditorView 2014-04-22 17:10:21 -06:00
Nathan Sobo
2532527a6a Add editor-colors class to EditorComponent 2014-04-22 17:10:21 -06:00
Nathan Sobo
f10076c87d Prevent activation events from bubbling
The react editor is wrapped in another div with the class of .editor for
backward compatibility. This prevents activation events registered on
the .editor selector from being triggered twice.
2014-04-22 17:10:21 -06:00
Nathan Sobo
083f65ed5d Remove envify dependency 2014-04-22 17:10:21 -06:00
Nathan Sobo
f59a8f1e68 Return function arg's result from Editor::batchUpdates 2014-04-22 17:09:45 -06:00
Nathan Sobo
bef554709f Emit 'cursor:moved' event to update cursor position in status bar
Emitting the event *before* update, rather than after. This is because
we read from the DOM after update to measure new characters, which
forces layout, so emitting the event after measuring forces another
layout when the position is updated.
2014-04-22 17:09:45 -06:00
Nathan Sobo
e5379515b9 Transfer focus to ReactComponent when wrapper view is focused 2014-04-22 17:09:45 -06:00
Nathan Sobo
a0ff6f5325 Handle 'autoscroll' option in model when setting selected buffer range 2014-04-22 17:09:45 -06:00
Nathan Sobo
dd4b6a6d28 Don't render empty selections 2014-04-22 17:09:45 -06:00
Nathan Sobo
51ee591282 Don't render cursors for non-empty selections 2014-04-22 17:09:45 -06:00
Nathan Sobo
19a5269a5f Remove metaprogrammed method delegators 2014-04-22 17:09:45 -06:00