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
Nathan Sobo
b6fb996ceb
Merge pull request #2327 from atom/ns-react-fork
...
Use Atom-specific fork of React allowing selection restoration opt out
2014-05-22 10:41:26 -06:00
Kevin Sawicki & Nathan Sobo
0951305962
Wire editor.lineHeight config value
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
9cbc693c77
Avoid measuring lineHeight/defaultCharWidth on show unless needed
...
We only need to re-measure if the fontSize, fontFamily, or lineHeight
changed while the editor was hidden.
2014-05-21 17:35:57 -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 & Nathan Sobo
68c3113b75
Call hide on the views instead of the jQuery collection
...
This ensures that views with custom ::hide methods can invoke special
behavior.
2014-05-21 17:11:36 -06:00
Nathan Sobo
65b1e13b83
Use Atom-specific fork of React allowing selection restoration opt out
...
This fork of React allows data-react-skip-selection-restoration to be
defined on input elements, skipping costly selection restoration that
occurs when the input element is focused during reconciliation.
2014-05-20 23:05:13 -06:00
probablycorey
746273a2ef
Merge remote-tracking branch 'origin/master' into cj-add-invisibles-to-react-editor
2014-05-20 16:30:18 -07:00
Nathan Sobo
778beba901
Remove editor-colors class from line numbers
2014-05-20 17:10:55 -06: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
probablycorey
ece868c9de
Concat strings instead of joining an Array
2014-05-20 15:16:07 -07:00
Nathan Sobo
ac993680db
Remove stray logging
2014-05-20 15:27:28 -06: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
probablycorey
2f038cbe66
Update lines component when invisibles changes
2014-05-20 12:34:18 -07:00
probablycorey
6880368a79
Add soft wrap support to invisibles
2014-05-20 11:49:31 -07:00
probablycorey
1e6e804ebb
Use screen line count to determine renderedEndRow
2014-05-20 11:37:32 -07:00
Nathan Sobo
6fef8de63e
Merge pull request #2284 from pritambaral/react-paste
...
Ignore paste in react editor, Fixes #2186
2014-05-20 11:50:26 -06:00
probablycorey
c999a6e0e4
Show carriage return invisibles
2014-05-20 10:38:01 -07:00
Cheng Zhao
6fa6863244
Don't popup context menu with no items, fixes #2032 .
...
On OS X popuping an empty context menu would have no effect but on Linux
an empty menu container would still be showed.
2014-05-20 22:36:51 +08:00
Nathan Sobo
0ad26c337a
Don't use _.pluck when building TokenizedLines
2014-05-19 22:20:57 -06:00
Nathan Sobo
353eb27d2e
Update dataset screenRow of gutter nodes when updating them
2014-05-19 21:34:06 -06:00
Nathan Sobo
6edb0b7a3d
Delete dead method
2014-05-19 21:32:26 -06:00
Nathan Sobo
cd5f0c0047
Update the screenRow on the line element's dataset in ::updateLineNode
2014-05-19 21:32:26 -06:00
probablycorey
9b5593d020
Put EOL invisibles into their own scope
2014-05-19 17:27:59 -07:00
probablycorey
4d642b91ef
Only pass invisibles through to the line component if needed
2014-05-19 17:10:36 -07:00
probablycorey
73ce81d597
Pass invisibles down to lines component
2014-05-19 16:56:53 -07:00
probablycorey
09e4c585aa
Add setInvisibles method
2014-05-19 16:56:17 -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
795399e184
Preserve the target when scrolling w/ mousewheel on editor lines
2014-05-19 14:17:09 -06:00
Nathan Sobo
37bdfb716b
Preserve the target when scrolling w/ mousewheel in gutter
...
Removing the target of a mouseweel event messes up velocity scrolling
with the track pad, so it needs to be preserved until scrolling ceases.
2014-05-19 14:03:34 -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
Pritam Baral
c7461f476e
Ignore paste in react editor, Fixes #2186
2014-05-18 04:17:21 +05:30
Nathan Sobo
8e65d30a84
Compute rendered row range once in EditorComponent and pass it down
2014-05-16 20:58:40 -06:00
Corey Johnson
9ca506de4b
Merge pull request #2173 from Locke23rus/issue-1791
...
💄 Deprecate backspaceToBeginningOf{Word,Line}
2014-05-16 15:13:44 -07:00
probablycorey
532f119b9d
Add application:install-update to workspaceView
2014-05-16 15:05:19 -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
57e6419d1d
Restore conditional loading of react editor renderer
2014-05-16 15:31:16 -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
fe82e3e30f
Only clear screen row caches on lines component if lineHeight changes
2014-05-16 15:31:16 -06:00
Nathan Sobo
6017b73acf
Add ability to look up line nodes by screen row
2014-05-16 15:31:15 -06:00
Nathan Sobo
0334177696
Make lineOverdrawMargin a property
2014-05-16 15:31:15 -06:00
Nathan Sobo
54cec0a5ff
Hold the gutter's width with a dummy line number
2014-05-16 15:31:15 -06:00
Nathan Sobo
c5fa2bf12d
Attach views to .lines instead of defunct .scroll-view-content
2014-05-16 15:31:15 -06:00
Nathan Sobo
bc8a1756f3
Use the .selections layer as the underlayer
2014-05-16 15:31:15 -06:00