Commit Graph

61 Commits

Author SHA1 Message Date
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
9b02055db9 Move selection background region calculation into React component 2014-05-16 15:31:13 -06:00
Nathan Sobo
0162247bd7 Precompute selection regions for all lines
This is easer to reason about and probably more efficient than computing
everything on a per-line basis.
2014-05-16 15:31:13 -06:00
Nathan Sobo
ce9fe90217 Make multi-line selections appear to span the screen with a single div
Because lines are opaque and any area of a selection that overlaps a
line is actually rendered on the line itself, the screen-spanning
background of a multi-line selection can actually be rendered as a
single div spanning the entire screen from the first row to the
penultimate row of the selection.
2014-05-16 15:31:13 -06:00
Nathan Sobo
7a9278e6a7 Render selection fragments on opaque lines
Because lines are opaque on the GPU for sub pixel antialiasing, the
lines obscure the selections which were formerly rendered behind the
lines. This commit renders selection fragments *on* each opaque line
layer so the selections look correct again. Still needs cleanup and
optimization.
2014-05-16 15:31:13 -06:00
Kirill Nikitin
917b223c6c merge conflict 2014-05-16 11:45:43 +04: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
b77ea04056 💄 Remove unnecessary double conditions 2014-05-12 00:06:01 +02:00
abe33
e7acbb314e 😕 Forgot to replace most references to clipboardMetadata
Never attempt to fix a PR right before going to sleep!
2014-05-09 09:33:35 +02:00
abe33
3e12695914 💄 Clear object deconstruction in Selection::copy 2014-05-09 00:07:46 +02:00
abe33
fbabc6f455 Implements multiple selections clipboard paste
Includes:

  - Passing the selection index in the `Editor::mutateSelectedText`
method callback
  - Storing all the selections content on many calls of
`Selection::copy` with `maintainClipboard = true` in a metadata
`selections` array
  - Handling clipboard with a `selections` metadata in
the`Editor::pasteText` method
2014-05-06 23:19:39 +02: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
Nathan Sobo
283966dbb9 Only autoscroll selections in the model when managing scroll position 2014-04-23 12:42:02 -06:00
Corey Johnson
6b833043db Removed references to the isReversed option 2014-04-22 17:51:44 -07: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
a0ff6f5325 Handle 'autoscroll' option in model when setting selected buffer range 2014-04-22 17:09:45 -06:00
Nathan Sobo
48d90e3dfc Funnel cursor and selection updates through EditorComponent 2014-04-22 17:09:43 -06:00
Nathan Sobo
93388c2048 Make Cursor and Selection models for automatic id assignment 2014-04-22 17:09:43 -06:00
Nathan Sobo
3d3b72a954 Render selections 2014-04-22 17:09:04 -06:00
Corey Johnson
1583271e2f Use setTextInRange instead of change 2014-04-18 15:50:30 -07:00
Corey Johnson
3644a36d67 Clearing a selection will also finalize the selection
Fixes #1843
2014-04-11 09:44:57 -07:00
Kevin Sawicki
9fce23d5ac Update option to preserveLeadingWhitespace 2014-03-19 10:05:34 -07:00
Kevin Sawicki
8e62d772b3 Ignore leading whitespace when auto-indenting a newline
Refs atom/language-less#1
2014-03-19 10:05:34 -07:00
Nathan Sobo
99b5675c4e Ensure position is a Point in Selection::selectToPosition
Fixes #1750
2014-03-11 20:42:42 -06:00
Nathan Sobo
aa04589dd2 Rename Editor::joinLine to ::joinLines
It acts on multiple lines, and in a quick survey of the literature I see
Sublime docs referring to it as "join lines" as well.
2014-02-27 16:16:01 -08:00
Nathan Sobo
f17c490768 Make Editor::unfoldBufferRow destroy all folds containing the buffer row
Also, remove ::destroyAllFoldsContainingBufferRow as it is now redundant
2014-02-27 16:16:01 -08:00
Nathan Sobo
53fb36d0e2 Switch all documentation links to match CoffeeScript literal notation
Foo::bar for instance methods
Foo.bar for class methods
2014-02-19 17:23:47 -07:00
Kevin Sawicki
da9a7a18dd 📝 doc parameters in selection.coffee 2014-02-06 17:16:31 -08:00
Kevin Sawicki
967db1f7b8 Remove more empty Private: comment blocks 2014-02-06 11:21:03 -08:00
Kevin Sawicki
932a792289 Remove Private: prefix 2014-02-06 10:02:53 -08:00
Kevin Sawicki
a04f77b400 Update atom.clipboard.read() call for new return value 2014-02-03 13:50:48 -08:00
Kevin Sawicki
66530eb69a Rename remaining pasteboard occurences 2014-02-03 13:28:09 -08:00
Kevin Sawicki
b1e99d9927 Use atom.clipboard instead of atom.pasteboard 2014-02-03 13:10:10 -08:00
Kevin Sawicki
e6565f6561 Return object from Pasteboard::read
Closes #1465
2014-02-03 12:19:14 -08:00
Kevin Sawicki
d95aa0aac1 Expand buffer range in Selection::selectLine 2014-01-08 16:27:09 -08:00
Nathan Sobo
c6770aa83e Merge remote-tracking branch 'origin/master' into ns-remove-telepath-from-core
Conflicts:
	package.json
	src/pane.coffee
2014-01-03 17:46:45 -07:00
Nathan Sobo
e26d97d5ac Remove telepath as a core dependency 2014-01-03 17:42:11 -07:00
Nathan Sobo
77dba8d19b Merge branch 'master' into ns-fix-mini-editor-leak 2014-01-03 10:03:25 -07:00
Nathan Sobo
dd2c6d2f24 Eliminate TextBuffer's dependence on telepath
Atom's TextBuffer now relies on the text-buffer npm for its core
functionality.
2013-12-31 12:13:15 -07:00
probablycorey
8d2e1b7e43 Selection::selectToEndOfLine acts on screen lines. 2013-12-31 08:38:27 -08:00
Nathan Sobo
42b203d502 🚱 Fix mini editor leak
Previously, we were overriding Editor::destroy, which is now provided
by telepath. Since the real destroy wasn't being called, we were failing
to remove editors associated with mini editor views.
2013-12-18 17:05:34 -07:00
Kevin Sawicki
1d783826a2 📝 Doc Selection::compare 2013-11-22 15:19:23 -08:00
probablycorey
31a9bb83cf Replace editSession variables with editor 2013-11-19 15:22:47 -08:00
probablycorey
bf05ddb958 🔫
I screwed up a rebase, this nasty commit is the result.
2013-11-19 15:15:12 -08:00
probablycorey
955d379e0e Rename EditSession to TextEditor 2013-11-19 14:56:09 -08:00
Kevin Sawicki
f356190b42 Use atom.pasteboard instead of window.pasteboard 2013-11-11 08:43:14 -08:00
Kevin Sawicki
3b52a6a040 Use underscore-plus 2013-11-01 15:50:38 -07:00
Nathan Sobo
e70f87dfc7 Upgrade to telepath 0.20.0 so simple selection changes aren't undone
This version of telepath adds an `undo: 'combine'` option which becomes
the default for marker changes. With an undo strategy of 'combine', the
operation is only undone when combined in a transaction with other
operations that are undone. This prevents simple marker updates from
getting pushed to the undo stack.
2013-11-01 16:39:32 -06:00
Ben Ogle
70925263f7 Add ability to specify rowCount to selectUp and selectDown() 2013-10-31 17:47:13 -07:00
Kevin Sawicki
e5ac73e0db Use includeInto instead of _.extend 2013-10-14 17:28:26 -07:00