Commit Graph

4074 Commits

Author SHA1 Message Date
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
Kevin Sawicki
b6fcc35131 Write removed file to temp directory 2014-06-02 10:17:13 -07:00
Kevin Sawicki
1704c78eea Enable core specs when run outside of clone repo
The failing specs have been updated so that specs
can now run without the requirement of a Git repository
at the root.
2014-06-02 10:17:13 -07:00
Kevin Sawicki
bcad8c1b3e Remove # which is interpreted as a tag
This spec was not running because of it since
jasmine-tagged is configured to filter tags by
process.platform
2014-06-02 10:17:13 -07:00
Kevin Sawicki
81d9193bf4 Copy repository to temp folder 2014-06-02 10:17:13 -07:00
Kevin Sawicki
7514f70434 Set project path to temp working directory 2014-06-02 10:17:13 -07:00
Kevin Sawicki
12a8688a9b Copy repository in remaining specs 2014-06-02 10:17:13 -07:00
Kevin Sawicki
0524a724e1 Move fixtures into repo 2014-06-02 10:17:13 -07:00
Kevin Sawicki
805c7ae301 💄 2014-06-02 10:17:13 -07:00
Kevin Sawicki
3f3dabed41 Remove spec completely tested in git-utils library 2014-06-02 10:17:13 -07:00
Kevin Sawicki
516035a82c Add copyRepository helper 2014-06-02 10:17:12 -07:00
Kevin Sawicki
08686ee769 Use temp directory in isPathNew/Modified specs 2014-06-02 10:17:12 -07:00
Kevin Sawicki
5b479ad5f5 Use temp directory in checkoutHead specs 2014-06-02 10:17:12 -07:00
Kevin Sawicki
d4366aa09e Pass element not jQuery object as target
Previously this was passing since ctrl-z was completely unbound at
this point which isn't the case on Windows.
2014-06-02 10:17:12 -07:00
Nathan Sobo
d31669c67f Merge EditorScrollViewComponent into Editor
I don't think that this component was really carrying its weight. Its
render function basically passed through directly to other components
that updated between renders, but didn't contain any content on its
own that actually changed after the first render.

React components seem to carry overhead, so I want every component we
use to count. Also, I'm considering circumventing some of React's
standard update logic for performance reasons, and making the structure
more shallow will help with that.
2014-06-01 15:24:59 +09:00
steffen
437b0decab Fix indenting of HTML (closing) tags for instance. Fix #1294
The indentation level is not anymore reduced by adding a new line,
which previously caused multiple reductions of the indentation level.
This fixes the behavior of HTML closing tags, which currently
"jump" backwards if you try to move them down.
2014-05-31 13:32:14 +02:00
Nathan Sobo
2548891b99 Clear the mousewheelScreenRow even if the event does not cause scrolling
If a mousewheel event is triggered when the editor can't be scrolled,
we still want to clear the mouseWheelScreenRow. This is typically done
when we stop scrolling, but if we never start scrolling it will never
happen. This commit adds another timeout to cover that case.
2014-05-31 18:36:59 +09:00
Nathan Sobo
115a7e1dfb 💄 Give mousewheel events their own describe block 2014-05-31 18:20:27 +09:00
Nathan Sobo
0043072ecf Only preserve mouseWheelScreenRow if it's out of the rendered row range
Fixes #2429, #2443

Otherwise, it's possible to duplicate lines. If a line is in the
rendered row range and it's not in the set of lines returned by the
editor, we should remove it no matter what. Line preservation is only
intended for lines that are out of view.
2014-05-31 08:56:57 +09:00
Nathan Sobo
89c57b6d52 Only set the mouseWheelScreenRow when scrolling vertically
When we handle a mousewheel event targeting a line or line number, we
assign the mousewheelScreenRow to prevent the removal of the target
node, which interferes with velocity scrolling.

However, the ::mousewheelScreenRow is only cleared 100ms after we stop
scrolling vertically. This means that if we're only scrolling
horizontally, it's never cleared. This causes the line node associated
with this screen row to hang around longer until the mousewheel screen
row is cleared again, which is not what we want.

This commit only assigns the ::mousewheelScreenRow when scrolling
vertically, so we can be sure it will be cleared.
2014-05-31 08:56:57 +09:00
probablycorey
c9ae9e11c1 Reword specs 2014-05-28 16:34:42 -07:00
probablycorey
7f57a094f6 Determine softTab state after the buffer is tokenized. 2014-05-28 16:31:00 -07:00
probablycorey
b7df08cbdd Add spec to re-emit the tokenized event when the grammar is changed 2014-05-28 16:10:02 -07:00
probablycorey
89dc5f26ad Only emit the tokenized event after the first full tokenization 2014-05-28 15:56:08 -07:00
probablycorey
2c60b0463e Use tokenized buffer created by editor 2014-05-28 15:46:26 -07:00
probablycorey
c56ac70181 Add tokenized event to tokenized buffer 2014-05-28 14:53:38 -07:00
Erik Håkansson
a90039baab fixes to spec 2014-05-24 23:52:08 +02:00
Erik Håkansson
55228f9667 updated coding style and added spec 2014-05-24 23:52:08 +02:00
Erik Håkansson
6295c2ddc4 minor changes 2014-05-24 23:52:08 +02:00
Nathan Sobo
0e31557abf Only measure character widths when editor is visible 2014-05-23 15:59:44 -06:00
Nathan Sobo
5b149bd41a Merge pull request #2370 from atom/ns-react-fix-scroll-corruption
Prevent React editor's scroll view from being auto-scrolled by Chromium
2014-05-23 12:54:15 -06:00
Corey Johnson
3784b77b95 Merge remote-tracking branch 'origin/master' into cj-paragraph-test 2014-05-23 09:23:30 -07:00
karlin
64470a3c7d add moveToBeginningOf{Next,Previous}Paragraph for cursor and wrappers for editor 2014-05-23 00:51:01 -04:00
Nathan Sobo
446a48ca00 Position hidden input at 0,0 unless cursor is focused
The editor's scroll view is getting autoscrolled when the editor is
focused, so we won't position the hidden input until after the editor
is focused, and will always return it to 0,0 when the editor is blurred.
2014-05-22 20:13:50 -06:00
Nathan Sobo
875cfefd36 Merge branch 'master' into ns-ks-react-dont-measure-when-hidden
Conflicts:
	spec/editor-component-spec.coffee
	src/editor-component.coffee
	src/editor-scroll-view-component.coffee
	src/lines-component.coffee
2014-05-22 10:48:21 -06:00
Kevin Sawicki & Nathan Sobo
481935c880 Add specs for updating lineHeightInPixels when changing font size/family 2014-05-22 10:17:22 -06:00
Kevin Sawicki & Nathan Sobo
8ffcdad89a Re-measure the line height in pixels when the CSS line-height changes 2014-05-22 10:17:21 -06:00
Kevin Sawicki & Nathan Sobo
9e3ce09658 Rename lineHeight to lineHeightInPixels to distinguish from CSS value
CSS has a line-height property with values like '1.3', but we also have
a measured pixel value for line height. It's important to keep these
separate conceptually.
2014-05-22 10:17:12 -06:00
Kevin Sawicki & Nathan Sobo
45eeee9aea Ensure .lines div is always at least the height of the scroll view
This ensures that the wrap guide extends the entire height of the
editor.
2014-05-21 19:07:03 -06:00
Kevin Sawicki & Nathan Sobo
ee9d4ab70e Don't measure lineHeight/defaultCharWidth when editor is hidden 2014-05-21 17:15:47 -06:00
Kevin Sawicki
c700ca0430 Remove unused sync option 2014-05-21 08:55:40 -07:00
Nathan Sobo
9278920093 Merge branch 'master' into cj-add-invisibles-to-react-editor
Conflicts:
	src/editor-component.coffee
2014-05-20 17:03:14 -06:00
Nathan Sobo
48b33ed07d 💄 2014-05-20 15:17:19 -06:00
probablycorey
a722d1aa36 Make editor component spec pass 2014-05-20 14:07:36 -07:00
probablycorey
25e3ae0325 Re-render the lines when the showInvisible config option is triggered 2014-05-20 13:58:22 -07:00
Nathan Sobo
2ae7cba452 Don't blink cursors with CSS animation
It seems to create intermittent lags when moving the cursor and typing.
2014-05-20 14:04:59 -06:00
Nathan Sobo
fa3ebc8c0f Fix interval cancellation in specs 2014-05-20 14:03:44 -06:00
probablycorey
ff36781c98 Add failing spec for toggling showInvisibles config option 2014-05-20 12:34:43 -07:00
probablycorey
f962888b35 Remove unnecessary spec 2014-05-20 11:49:40 -07:00
probablycorey
6880368a79 Add soft wrap support to invisibles 2014-05-20 11:49:31 -07:00
probablycorey
c999a6e0e4 Show carriage return invisibles 2014-05-20 10:38:01 -07:00
probablycorey
2bbf5c7800 Remove unnecessary spec 2014-05-20 10:37:24 -07:00
probablycorey
273203e4c9 Fix typo 2014-05-20 10:37:02 -07:00
Nathan Sobo
84e76556da Try to fix flaky spec 2014-05-20 11:11:35 -06:00
probablycorey
9b5593d020 Put EOL invisibles into their own scope 2014-05-19 17:27:59 -07:00
probablycorey
8b4cff474f Spec 💄 2014-05-19 17:10:04 -07:00
probablycorey
73ce81d597 Pass invisibles down to lines component 2014-05-19 16:56:53 -07:00
probablycorey
cbe07b49aa Add basic invisible specs 2014-05-19 16:20:51 -07:00
Nathan Sobo
d2bc7ab192 Merge pull request #2258 from atom/ns-react-scroll-perf
Improve scroll performance of the React editor
2014-05-19 14:42:18 -06:00
Nathan Sobo
bfc382c398 Add specs for line/line-number preservation 2014-05-19 14:33:17 -06:00
Kevin Sawicki
314833bbac Add missing parens on indent guide check
Previously the indent guide was always showing on the whitespace only lines

Closes #2274
2014-05-19 08:52:06 -07:00
Corey Johnson
9ca506de4b Merge pull request #2173 from Locke23rus/issue-1791
💄 Deprecate backspaceToBeginningOf{Word,Line}
2014-05-16 15:13:44 -07:00
Nathan Sobo
c058483422 Update the gutter width when the number of digits changes 2014-05-16 15:56:18 -06:00
Nathan Sobo
9b7547cbe0 Get indent guide specs passing again 2014-05-16 15:31:16 -06:00
Nathan Sobo
e74dfe3438 Fix gutter specs and update lines when digit counts change 2014-05-16 15:31:16 -06:00
Nathan Sobo
b000e8e4a2 Get selection specs passing again 2014-05-16 15:31:16 -06:00
Nathan Sobo
64c82f1c87 Update cursor positioning text for simplified token markup 2014-05-16 15:31:15 -06:00
Nathan Sobo
0ad2730353 Update specs for new line node rendering approach
Lines are no longer translated on the GPU, and they aren't inserted into
the DOM in an order that reflects their order in the buffer.
2014-05-16 15:31:15 -06:00
Nathan Sobo
070d239f41 Blink cursors with a CSS animation
Now that they're on their own layer, I don't think it affects the
repaint timing when typing on lines (if it ever did).
2014-05-16 15:31:13 -06:00
Nathan Sobo
9001d34ddf Change selection specs to match new rendering scheme 2014-05-16 15:31:13 -06:00
Nathan Sobo
e44027b186 Fix the height/width of the editor in spec
Now that everything is absolutely position, the editor no longer assumes
a "natural" height and width. This can be addressed later if we want to
allow editors to expand based on their content.
2014-05-16 15:31:13 -06:00
Nathan Sobo
d53f97ecfe Fix horizontal scrolling spec 2014-05-16 15:31:13 -06:00
Nathan Sobo
f3efd7d60b Position cursors relative to scrollLeft and fix specs 2014-05-16 15:31:12 -06:00
Nathan Sobo
8d25da9474 Update line number rendering specs for new layer scheme 2014-05-16 15:31:12 -06:00
Nathan Sobo
1aee276b45 Update line rendering specs for new layer scheme 2014-05-16 15:31:12 -06:00
Nathan Sobo
3f1ce617a7 Try to fix flaky spec 2014-05-16 15:05:49 -06:00
Kirill Nikitin
8918eb4758 Bug #1791 Fix typo in example group name and function names. 2014-05-16 23:05:05 +04:00
Nathan Sobo
f2c7d171bf Fix another subscription leakage associated with theme manager specs 2014-05-16 09:14:21 -06:00
Nathan Sobo
7a4a85cb20 Fix failures running config specs locally 2014-05-16 09:00:01 -06:00
Nathan Sobo
ce668e7139 Fix subscription leak when ~/.atom/styles.less is present running specs 2014-05-16 08:33:49 -06:00
Kirill Nikitin
917b223c6c merge conflict 2014-05-16 11:45:43 +04:00
Corey Johnson
25f5717ccf Merge pull request #1971 from abe33/feature_proper_multiselections_copy_paste
Implements multiple selections clipboard paste
2014-05-12 11:10:37 -07:00
Kirill Nikitin
111b5d1fbe 💄 Deprecate backspaceToBeginningOf{Word,Line}
Rename functions `backspaceToBeginningOfWord` to `deleteToBeginningOfWord` and
`backspaceToBeginningOfLine to `deleteToBeginningOfLine`.
Rename commands `editor:backspace-to-beginning-of-word` to
`delete-to-beginning-of-word` and `editor:backspace-to-beginning-of-line` to
`editor:delete-to-beginning-of-line`.

Fix #1791
2014-05-12 02:50:20 +04:00
abe33
b2e86c80c4 Change test to cover all Selection::copy branches 2014-05-12 00:06:13 +02:00
Nathan Sobo
76b9982e04 Emit stylesheet-added/removed from ThemeManager w/ CSSStyleSheet objects
This enables subscribers to detect not just that stylesheets have
changed, but specifically how they have changed. This is used by the
React editor component to only refresh scrollbars when a stylesheet
that actually contains selectors for scrollbar elements is added or
removed.
2014-05-09 11:33:04 -06:00
Nathan Sobo
1c1ace90db Hide and show scrollbars before measuring them after stylesheet changes
We measure the scrollbar-corner node when there's a stylesheet change,
but Chromium won't apply the new style if it was already visible before
the change. This commit hides and shows it before measuring so we get
accurate values.
2014-05-09 11:33:04 -06:00
Nathan Sobo
bdd605e85b Explicitly assign dummy scrollbars to the correct width/height
Previously, dummy scrollbars were always 15px wide/tall. This caused
them to obscure the ability to click for the entire 15px region, even if
the actual scrollbar was styled to be much thinner. Now we explicitly
measure the size of scrollbars on mount and when the stylesheets change
and set the height/width explicitly.
2014-05-09 11:33:04 -06:00
Nathan Sobo
e1b4b921ba Hide scrollbar when not scrollable in a given direction 2014-05-09 11:33:04 -06:00
Nathan Sobo
ab1ede5fe6 Add a dummy scrollbar corner
Horizontal / vertical scrollbars render a 'corner' on the lower right
when they would otherwise overlap. I previously relied on drawing both
dummy scrollbars at their full width/height so the corner got rendered,
but that interfered with the display of the horizontal scrollbar in
certain circumstances because it was too wide to scroll. This commit
provides that behavior with an absolutely positioned div with the same
dimensions as the intersection of scrollbars when both are visible.
2014-05-09 11:33:04 -06:00
Nathan Sobo
5e6d91d66c Don't allow spec window size to interfere with the size of the editor 2014-05-09 11:33:04 -06:00
Nathan Sobo
dbd271f70a Don't obscure last character of long lines with vertical scrollbar
This entailed quite a few changes to dial in scrollbars. The scrollbars
are now adjusted in size to account for the width of the opposite
scrollbar. If the width or height are not explicitly constrained and we
are scrollable in the opposite direction that is constrained, we account
for the width of the opposite scrollbar in assigning a natural height
or width based on the content.
2014-05-09 11:33:04 -06:00
Nathan Sobo
527ada47f9 Account for gutter width in scrollWidth of horizontal scrollbar
Because the scrollbar now spans the entire editor but the scrollable
area does not include the gutter, we need to add the current width of
the gutter to the scroll width of the horizontal scrollbar to allow
it to scroll to the end of the longest lines.
2014-05-09 11:33:03 -06:00
Nathan Sobo
afb70d0a95 Remove stray return in spec 2014-05-09 11:33:03 -06:00
Nathan Sobo
b5f910ad06 Update line number padding when max digits changes 2014-05-09 11:33:03 -06:00
Nathan Sobo
7b4bc16531 Fix specs that broke when accounting for horizontal scrollbar height 2014-05-09 11:33:03 -06:00
Nathan Sobo
e6df30e94c Respect horizontal scrollbar when rendering the vertical, and vice versa
We set overflow to hidden in the opposite scroll direction only if we
can't actually scroll in that direction, causing the white square where
neither scrollbar overlaps to appear at the lower right corner.
2014-05-09 11:33:03 -06:00
Nathan Sobo
d9ba9262bf Update scrollTop to valid position when scrollbar disappears 2014-05-09 11:33:03 -06:00
Nathan Sobo
c4be32a5dd Revert "Revert "Don't obscure the last line of the editor with the horizontal scrollbar""
This reverts commit 1d634e471e.
2014-05-09 11:33:03 -06:00
abe33
ed1c8897ec 😅 Forgot to remove the test focus 2014-05-09 00:07:00 +02:00
abe33
554165ca48 💄 Harmonize lineForRow calls in specs 2014-05-09 00:02:31 +02:00
abe33
5a5cb869e2 💄 Replace have with has in spec description 2014-05-08 23:59:55 +02:00
probablycorey
6bb260140b Don't use comment lines to determine soft/hard tabs.
Closes atom/language-php#24
Closes #1733
2014-05-07 12:18:05 -07:00
abe33
56a1ecf6c1 Adds specs for multi selections clipboard handling 2014-05-07 00:13:04 +02:00
Kevin Sawicki
240747ed76 💄 Tweak spec descriptions 2014-05-05 11:28:36 -07:00
Kevin Sawicki
8b5fd64dd4 Guard against PaneAxis as first child
Pane::findLeftmostSibling expected to return a Pane, not a PaneAxis
2014-05-05 11:28:36 -07:00
Kevin Sawicki
1c514bdc6b Split right when rightmost sibling is an axis
This was previously throwing an error when Workspace::open was called
with a split: right option and the rightmost sibling was a PaneAxis
since it was assuming findOrCreateRightmostSibling was always returning
a Pane, not a PaneAxis.
2014-05-05 11:28:36 -07:00
Kevin Sawicki
27b02a7981 Add initialColumn options to Workspace::open
This options works similarly to the existing initialLine option
2014-04-30 16:07:26 -07:00
Kevin Sawicki
33c02ef3e1 Mention double clicking in spec description 2014-04-30 09:58:37 -07:00
Kevin Sawicki
aa4749f175 Select all adjacent whitespace on double click
Cursor::isSurroundedByWhitespace was use column 0 instead of the
position right before the cursor.
2014-04-30 09:58:37 -07:00
Kevin Sawicki
9cf642e910 Preserve indentation when commenting
Previously this happened only when the language did not have a
comment end pattern.
2014-04-30 09:50:11 -07:00
Corey Johnson
e8c62b501f Fix workspaceView spec 2014-04-29 16:59:15 -07:00
Nathan Sobo
6ff2b2a01e Fix undefined variables in tokenized-line-spec 2014-04-29 17:24:16 -06:00
Kevin Sawicki
960285a270 Unfocus EditorComponent spec 2014-04-29 16:11:20 -07:00
Corey Johnson
fa4b3c8dea Merge pull request #1903 from atom/cj-add-deprecation-warning-to-specs
Remove all deprecated calls from core
2014-04-24 15:36:53 -07:00
Corey Johnson
c7e308bca0 Remove use of OpenSync from specs 2014-04-24 14:14:10 -07:00
Corey Johnson
bec65cf2ac Only fail on deprecations when core specs are run 2014-04-24 13:47:01 -07:00
Corey Johnson
2ceccf5239 Exclude EditorViews that are mini editors from WorkspaceView::eachEditorView
Fixes #1900
2014-04-24 09:26:04 -07:00
Corey Johnson
c03dec2783 Merge remote-tracking branch 'origin/master' into cj-add-deprecation-warning-to-specs 2014-04-23 16:51:14 -07:00
Corey Johnson
9d92a27ccf Remove deprecated method calls from project spec 2014-04-23 16:50:25 -07:00
Corey Johnson
b652dc8fd8 Use workspace.open instead of project.open 2014-04-23 16:36:44 -07:00
Corey Johnson
c1929540a3 Remove deprecated calls in pane view spec 2014-04-23 16:35:51 -07:00
Corey Johnson
1601423f30 Update deprecated calls in language mode spec 2014-04-23 16:31:00 -07:00
Corey Johnson
c1907054b7 Remove deprecated methods from display buffer spec 2014-04-23 16:24:10 -07:00
Corey Johnson
5f524c1181 Remove deprecated calls from git spec 2014-04-23 16:22:44 -07:00
Corey Johnson
b897603b66 Remove deprecated option from selection spec 2014-04-23 16:22:34 -07:00
Corey Johnson
0e5c530006 Remove rogue focused spec 2014-04-23 16:19:43 -07:00
Corey Johnson
4a60b5787a Remove deprecated calls from editor view spec 2014-04-23 16:18:48 -07:00
Corey Johnson
88cc69f87a Update enableKeymap spec helper 2014-04-23 16:18:36 -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
Corey Johnson
38c25feee0 Remove deprecated calls to editor spec 2014-04-23 11:27:23 -07:00
Corey Johnson
b30a2c9442 Remove deprecated calls from workspace view spec 2014-04-22 16:51:50 -07:00
Corey Johnson
3eb99c9391 Remove deprecated call from spec helper 2014-04-22 16:51:38 -07:00
Corey Johnson
b5ac7c89a3 Update spec to match its description 2014-04-22 16:47:17 -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
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
22496ceeb1 WIP: Minimize paint when scrolling and composite lines with the GPU 2014-04-22 17:10:22 -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
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
9b6fa967be Handle the editor:consolidate-selections command in the React editor 2014-04-22 17:09:45 -06:00
Nathan Sobo
f02d956362 Preserve the only the target screen row when scrolling via mousewheel
When the target of a mousewheel event is removed, it breaks velocity
scrolling.

Previously, we were preserving the entire screen range when scrolling
with the mouse wheel, which caused a lot of DOM nodes to accumulate. Now
we only preserve the individual line and line number associated with the
target of the mousewheel event, moving them just off screen below all
the on-screen lines and line numbers. This keeps the number of DOM nodes
limited while retaining velocity effects.
2014-04-22 17:09:44 -06:00
Nathan Sobo
6607f99c6c Use padding-top/bottom rather than spacer divs in lines and gutter
It creates a simpler DOM structure.
2014-04-22 17:09:44 -06:00
Nathan Sobo
ae9f79bfc4 Only add indent guide to trailing whitespace on whitespace-only lines 2014-04-22 17:09:44 -06:00