Commit Graph

113 Commits

Author SHA1 Message Date
Nathan Sobo
f39891b912 Folds are destroyed when their placeholder line is clicked 2012-05-21 17:55:58 -07:00
Nathan Sobo
ce1c1ff081 Render fold lines with the 'fold' class and remove old fold placeholder support 2012-05-21 13:38:39 -07:00
Corey Johnson & Nathan Sobo
39e02bbf9f wip: what nathan and corey did 2012-05-18 15:15:44 -07:00
Corey Johnson & Nathan Sobo
20c9b61b91 Fix issue where creating a second fold on a wrapped line fragment caused a duplicate line to be rendered 2012-05-18 12:22:40 -06:00
Corey Johnson & Nathan Sobo
608ccc38e8 Update rendered lines when buffer changes occur outside/straddling rendered region 2012-05-17 16:06:39 -07:00
Corey Johnson & Nathan Sobo
fdf9676ea1 Add scrollBottom to editor 2012-05-17 16:04:57 -07:00
Corey Johnson
857486bcf1 After buffer changes, remove any lines that are beyond the current last rendered screen row. 2012-05-17 10:34:54 -07:00
Nathan Sobo
5045d68be2 2012-05-16 14:47:09 -06:00
Nathan Sobo
92395a9cfb Merge branch 'master' of github.com:github/atom
Conflicts:
	src/app/editor.coffee
2012-05-16 14:07:44 -06:00
Nathan Sobo
442e89e77e 💄 – rename render/updateLines to render/updateVisibleLines 2012-05-16 14:03:26 -06:00
Nathan Sobo
2d8ba3b1ee Use translate3d to scroll lines / gutter in attempt to improve repaint.
Also: Add custom scrollTop method to editor that manages all the custom optimizations we are doing around scrolling.
2012-05-16 13:47:59 -06:00
Corey Johnson
4fb19bf9cc Fixes bug in benchmarks
Need to investigate further
2012-05-16 12:31:59 -07:00
Corey Johnson
05903a6e56 💄 2012-05-16 11:21:28 -07:00
Corey Johnson
1b2b5b3311 💩 2012-05-16 11:06:42 -07:00
Corey Johnson
3614ad6e76 Update lines when the font size changes 2012-05-16 10:58:19 -07:00
Corey Johnson
85c0d6a35a Only update lines if it is needed 2012-05-16 10:58:02 -07:00
Corey Johnson
399fc71b3c Make Atom SpacePen view's default to empty object (where needed) 2012-05-16 10:35:50 -07:00
Corey Johnson
bf4b41e482 Revert "Don't trigger scroll event on edit session load, it is called automatically "
This reverts commit cae7c18db4.
2012-05-16 09:07:19 -07:00
Corey Johnson
cae7c18db4 Don't trigger scroll event on edit session load, it is called automatically
Fixes partially rendered lines when you reload
2012-05-15 15:28:10 -07:00
Corey Johnson
aacd077749 Editor.renderLines() calls updateLines (more DRY) 2012-05-15 14:47:59 -07:00
Corey Johnson
484b55800a Call updateLines when lines are removed from buffer 2012-05-15 14:27:22 -07:00
Corey Johnson
91aebde968 Only update gutter when editor is attached 2012-05-15 12:32:46 -07:00
Corey Johnson
54a3823606 Buffer change events update the @lastRenderedScreenRow 2012-05-15 12:29:59 -07:00
Corey Johnson
63d53af577 💩 2012-05-15 10:46:58 -07:00
Corey Johnson
6b3664a040 Vertical scrollbar height is updated when switching buffers 2012-05-15 10:02:56 -07:00
Corey Johnson & Nathan Sobo
9079bcb103 Meta-a selects everything 2012-05-14 16:18:37 -06:00
Corey Johnson & Nathan Sobo
d99a12b6cf Don't defer scroll after cursor changes position to make scrolling feel smoother 2012-05-14 15:42:31 -06:00
Corey Johnson
b35a2502c6 Gutter line numbers are rendered similarly to the scroll view's lines 2012-05-14 12:32:53 -07:00
Corey Johnson
95440cc9dc bufferRowsForScreenRows method on editor and renderer take start/end arguments 2012-05-14 09:53:58 -07:00
Nathan Sobo
0c89db37a5 Editor scroll position is correctly restored on refresh.
When we attach the editor we need to scroll it to the correct position before rendering lines. But to scroll it to the right position, the lines container and the scrollbar need to be assigned a height that allows them to scroll. So now we call `prepareForVerticalScrolling` on attach, then set the scroll position based on the edit session and render the visible lines.
2012-05-11 17:51:47 -06:00
Nathan Sobo
96d92be230 Rename Editor.scrollbar to verticalScrollbar for clarity 2012-05-11 13:45:57 -06:00
Nathan Sobo
b64e9ae10f Rename Editor.scroller to Editor.scrollView to distinguish it from the vertical scrollbar.
Also, base edit session scroll top on the scrollbar instead of the scrollView.
2012-05-11 13:42:57 -06:00
Corey Johnson & Nathan Sobo
c93c63d721 Editor.scroller WheelEvents are forwarded to Editor.scrollbar 2012-05-11 11:04:04 -07:00
Corey Johnson & Nathan Sobo
9427c82084 WIP: Getting specs passing with new stand-in vertical scrollbar 2012-05-11 11:52:03 -06:00
Corey Johnson & Nathan Sobo
e433e08c78 Revert "WIP: Don't actually scroll the lines… just play with their margin to make them look like they scroll"
This reverts commit b3206a5a8b.
2012-05-10 18:05:25 -06:00
Corey Johnson & Nathan Sobo
1a6ef9d7e2 Revert "Temporarily disable gutter. Add transition affect to margin-top."
This reverts commit 811e5264cf.
2012-05-10 18:00:58 -06:00
Corey Johnson & Nathan Sobo
811e5264cf Temporarily disable gutter. Add transition affect to margin-top. 2012-05-10 17:52:41 -06:00
Corey Johnson & Nathan Sobo
b3206a5a8b WIP: Don't actually scroll the lines… just play with their margin to make them look like they scroll 2012-05-10 17:30:06 -06:00
Corey Johnson & Nathan Sobo
f0d4999fa4 Nix console.log on scroll. 2012-05-10 17:13:00 -06:00
Corey Johnson & Nathan Sobo
502b463a72 WIP: Adding an artificial scrollbar so we can render content before we scroll. It's blue. 2012-05-10 16:59:46 -06:00
Corey Johnson & Nathan Sobo
02da32d372 Update visible lines when scrolling up 2012-05-10 16:11:05 -06:00
Corey Johnson & Nathan Sobo
43ac7edf0f Scrolling to bottom renders correct lines
When we scroll more than a single screen's worth of lines, the new first visible screen row ends up exceeding the previous last rendered screen row, so we need to use the maximum of the two when deciding which new rows to render.
2012-05-10 15:15:34 -06:00
Corey Johnson & Nathan Sobo
c5d2616155 WIP: Removing lines that are no longer visible 2012-05-10 12:08:58 -07:00
Corey Johnson & Nathan Sobo
22548141d7 Editor updates lines when it is resized 2012-05-10 11:14:03 -07:00
Corey Johnson & Nathan Sobo
f6e9d99865 Editor only does not pre-build lines, it only builds them when they are visible on the screen 2012-05-10 10:40:16 -07:00
Nathan Sobo
1e2d333a15 WIP: working on only rendering on-screen lines. still half-baked. 2012-05-10 09:27:04 -06:00
Corey Johnson & Nathan Sobo
5ae40a3cb8 Editor only renders lines when it is attached to the DOM 2012-05-09 19:19:54 -06:00
Nathan Sobo
8b1ac28b89 Editor font sizes can be adjusted with RootView.proto.setFontSize 2012-05-09 08:34:08 -06:00
Corey Johnson
4bd4b0d496 When there is a selection, tab/shift-tab indent/outdent selected text 2012-05-08 14:40:47 -07:00
Corey Johnson & Nathan Sobo
28ff26e845 Merge branch 'master' into statusbar
Conflicts:
	src/app/editor.coffee
	src/app/project.coffee
	src/app/root-view.coffee
2012-05-04 11:41:13 -06:00