Commit Graph

426 Commits

Author SHA1 Message Date
Maximilian Schüßler
381d5b91b2 Indentation respects tab stops now, fix #2672 2014-07-15 08:44:21 -07:00
Ben Ogle
db1652f1ed Add return statement docs 2014-07-09 18:25:37 -07:00
Ben Ogle
8013ff7775 Update decoration API docs 2014-07-09 18:16:20 -07:00
Nathan Sobo
86ea4d94bb Only autoscroll in model when adding selection in React editors
Fixes atom/find-and-replace#245
2014-07-09 07:46:44 -06:00
Nathan Sobo
e170b9f56b Render line-ending invisibles on empty lines
Fixes #2857

Including correct interleaving with indent guides.
2014-07-08 16:53:06 -06:00
Ben Ogle
d7a3ffa9de Handle Decoration::update 2014-07-07 15:13:04 -07:00
Ben Ogle
e991b3d10c Move from addDecoration -> decorateMarker 2014-07-07 14:43:56 -07:00
Ben Ogle
48b6c24882 Add Editor::selectionFlashDuration rather than magic number 2014-07-03 17:36:45 -07:00
Ben Ogle
a56b5eef2f Remove the decoration update stuff 2014-07-03 17:32:37 -07:00
Ben Ogle
80eb31679f Add a Decoration object. Rework to use this object 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
Ben Ogle
7b19152a58 Add updateDecorationForMarker() 2014-07-03 17:32:37 -07:00
Nathan Sobo
15ca3e2a40 Match existing editor's behavior for .cursor-line class 2014-06-28 15:39:22 +01:00
Nathan Sobo
9a6510c938 Add .cursor-line-no-selection decoration for backward compatibility 2014-06-28 15:39:22 +01:00
Nathan Sobo
825910dc1d Add onlyEmpty and onlyNonEmpty decoration options 2014-06-28 15:39:22 +01:00
Nathan Sobo
f5e54b0ba6 Only add 'selection-line' decoration when marker is non-empty 2014-06-28 15:39:21 +01:00
Nathan Sobo
70f352251e Only apply cursor-line decoration to head; Add selected-line decoration.
The cursor-line decoration shouldn't be applied to every line that's
selected. It should only be applied to the location of the cursor. We'll
need to update themes to reflect this.
2014-06-28 15:39:21 +01:00
Nathan Sobo
1b05708d7a Update addDecorationForMarker docs to talk about 'onlyHead' option 2014-06-28 15:39:21 +01:00
Ben Ogle & Nathan Sobo
f739dce210 Only recompute scroll width once for each batch of measured chars 2014-06-25 15:26:13 -07:00
Ben Ogle
f381abcbad Re-render when a marker changes
fixes #2705
2014-06-23 16:00:36 -07:00
Nathan Sobo
7c356d2592 Revert "Render highlights on their own layer to avoid GPU artifacts" 2014-06-21 01:58:11 -06:00
Nathan Sobo
e49414d2ec Merge pull request #2699 from atom/ns-react-fix-artifacts
Render highlights on their own layer to avoid GPU artifacts
2014-06-20 17:03:26 -06:00
Nathan Sobo
e084bebb54 Autoscroll to selections in model layer when added
Fixes #2698
2014-06-20 16:53:46 -06:00
Nathan Sobo
4218e0a037 Render highlights on their own layer to avoid GPU artifacts
Previously, when the last highlight div was removed from the lines
layer, chunks of the lines would sometimes disappear. Since we've
discovered that giving the lines an opaque background doesn't help with
subpixel anti-aliasing anyway, I've found that rendering highlights on
their own layer behind the lines and making the lines layer transparent
avoids the arficacts.
2014-06-20 15:18:19 -06:00
Nathan Sobo
64f3938f5c Batch all editor updates together automatically via process.nextTick 2014-06-20 15:06:10 -06:00
Kevin Sawicki
3faecb5988 📝 Correct broken references 2014-06-20 13:57:50 -07:00
Kevin Sawicki
148180adda Implement select page up/down in Editor 2014-06-20 13:09:27 -07:00
Nathan Sobo
388763e7cd Wait to measure characters if editor is hidden
Also, when characters *are* measured, request a display update
2014-06-19 04:19:51 -06:00
Nathan Sobo
17f9cc49f2 Honor the center: true option in scrollTo* methods
Fixes #2648
2014-06-18 21:48:14 -06: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
Nathan Sobo
2fffbba503 Eliminate Decoration class and use plain objects instead 2014-06-17 17:35:56 -06:00
Ben Ogle
d8240628a7 Update doc comments 2014-06-17 14:53:11 -07:00
Allen Nelson
ef7f0ed9ed updated docstring 2014-06-17 12:18:34 -05:00
Ben Ogle
031ec9798a No more typeless decorations
Now you can specify a list of types with your decoration.
2014-06-16 15:36:08 -07:00
Ben Ogle
1ebdd801f5 Use decorations to render selections 2014-06-16 15:36:08 -07:00
Ben Ogle
6394814142 Make foldable decorations work again 2014-06-16 15:36:08 -07:00
Ben Ogle
2d4360dcf0 Decorations can now only be attached to markers.
The basics work. It will render them on the gutter.
2014-06-16 15:36:08 -07: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
Ben Ogle
7e6e61905b Move the cursor on pageUp / pageDown
Previously it was only moving the scrollTop, but not the cursors. 
Affected on the react editor.

Refs #2423
2014-06-11 17:19:59 -07: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
Ben Ogle
6c609cb7d2 Revert "Move setImmediate into requestUpdate; Batch updates"
This reverts commit ad522e6ab1.
2014-06-09 14:45:43 -07:00
Ben Ogle
ad522e6ab1 Move setImmediate into requestUpdate; Batch updates 2014-06-09 14:40:59 -07:00
Ben Ogle
13be8d5139 Add a cursor-line decoration to the gutter 2014-06-09 14:04:24 -07:00
Ben Ogle
e8594ccec4 💄 Change var names for consistency 2014-06-09 14:04:23 -07:00
Ben Ogle
65ab436da2 API docs 2014-06-09 14:04:23 -07:00
Ben Ogle
02594e3f7a 💄 Use for loops 2014-06-09 14:04:23 -07:00
Ben Ogle
1b8be75a76 Add specs for the editor interface
for decorations in ranges and associated with markers
2014-06-09 14:04:23 -07:00
Ben Ogle
6ce859774a Name changes 2014-06-09 14:04:22 -07:00
Ben Ogle
9ee54801a2 Implement removeDecorationsForMarker 2014-06-09 14:04:22 -07:00