Commit Graph

178 Commits

Author SHA1 Message Date
Ben Ogle
80eb31679f Add a Decoration object. Rework to use this object 2014-07-03 17:32:37 -07:00
Ben Ogle
0ee4d864be Move flashing into the highlight component 2014-07-03 17:32:37 -07:00
Ben Ogle
1d724339d6 Don’t use attributes 2014-07-03 17:32:37 -07:00
Ben Ogle
ce90b72807 Handle the decoration + highlighted in the selection 2014-07-03 17:32:37 -07:00
Nathan Sobo
260be2e096 Autoscroll *after* inserting text, not before
Fixes #2787
2014-07-03 14:47:43 -06:00
Nathan Sobo
e93e4e9333 Autoscroll to the last cursor in model when inserting text
Fixes #2787
2014-07-01 11:37:17 -06:00
Ben Ogle
2eb5ef0816 Merge pull request #2665 from atom/bo-gutter-selection
Implement gutter clicking and dragging to change selection on react editor
2014-06-19 13:48:40 -07:00
Nathan Sobo
bee7be1d1a Fix errors refreshing directly after adding selection below/above 2014-06-19 13:43:10 -06:00
Ben Ogle & Nathan Sobo
9083103bb3 Add click and shift-click in gutter 2014-06-19 12:04:36 -07:00
Nathan Sobo
53c363b853 Merge pull request #2615 from adnelson/feature/delete-to-end-of-line
added delete to end of line
2014-06-18 10:46:48 -06:00
Allen Nelson
ef7f0ed9ed updated docstring 2014-06-17 12:18:34 -05:00
Allen Nelson
8411d41621 deleting only selection if selection is not empty 2014-06-16 16:13:40 -05:00
Allen Nelson
fc462fcd21 added delete to end of line 2014-06-16 10:59:55 -05:00
Ivan Zuzak
588d9b97eb Unindent only if the tab is at the start of the line 2014-06-11 18:31:37 +02:00
Nathan Sobo
68ca6a0a0d Merge pull request #2532 from karlin/select-paragraphs
Adds select-to-beginning-of-next/previous-paragraph commands
2014-06-11 05:39:30 -06:00
karlin
8577bf9a4c select to beginning of next or previous paragraph commands 2014-06-06 08:37:59 -04: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
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