Nathan Sobo
f47abdead9
Merge branch 'render-visible'
2012-05-11 17:52:23 -06: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
Corey Johnson & Nathan Sobo
af65bd785c
fix test failures
2012-05-11 16:06:42 -07:00
Corey Johnson & Nathan Sobo
d51b229d56
When the editor buffer changes and the path is not visible in the TreeView, It selects the closes ancestor entry of that file.
2012-05-11 15:44:18 -07:00
Corey Johnson & Nathan Sobo
2f86a3a6e5
TreeView starts with root being selected
2012-05-11 14:31:48 -07: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
Corey Johnson & Nathan Sobo
d76cc521bd
When no words are found, autocomplete does not raise an exception
2012-05-10 10:39:09 -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
Corey Johnson & Nathan Sobo
3fcc9b9a0c
optimization: Use hash instead of _.unique when building autocomplete word list
2012-05-09 16:12:49 -07:00
Corey Johnson & Nathan Sobo
8f77211f04
Cursor.getBeginningOfCurrentWordBufferPosition only uses the previous 2 lines for its scan range.
...
previous: editor.9000-line-file.at-end.move-to-beginning-of-word: 4695 / 100 = 46.95ms
new: editor.9000-line-file.at-end.move-to-beginning-of-word: 1618 / 100 = 16.18ms
2012-05-09 12:24:27 -07:00
Nathan Sobo
5b7ea95a11
Meta+ and meta- change the editor font size
2012-05-09 10:57:25 -06:00
Nathan Sobo
f2f44b9ab6
Can match key patterns with the '-' character
...
Add a parser to parse keystroke patterns instead of splitting on '-' with a regex
2012-05-09 10:56:31 -06:00
Nathan Sobo
8b1ac28b89
Editor font sizes can be adjusted with RootView.proto.setFontSize
2012-05-09 08:34:08 -06:00
Nathan Sobo
c734e1e41b
Remove @previouslyActiveElement from file finder. Always focus the root view on detach.
2012-05-08 20:14:35 -06:00
Nathan Sobo
dc4529887a
File finder detaches itself when it loses focus
2012-05-08 20:07:49 -06:00
Corey Johnson & Nathan Sobo
4665321b37
Project.getFilePaths does not traverse into ignored directories
2012-05-08 17:59:38 -07:00
Corey Johnson & Nathan Sobo
289193787e
Add fs.traverseTree
2012-05-08 17:45:29 -07:00
Corey Johnson
d9d78ada51
File finder calls detach (instead of remove) when a file is selected
2012-05-08 15:35:34 -07:00
Corey Johnson
d35efb6241
When FileFinder is canceled, it refocuses previously focused element
2012-05-08 15:35:01 -07:00
Corey Johnson
bc3b982514
Rename fileFinder.editor to fileFinder.miniEditor
2012-05-08 15:09:19 -07:00
Corey Johnson
4bd4b0d496
When there is a selection, tab/shift-tab indent/outdent selected text
2012-05-08 14:40:47 -07:00
Nathan Sobo
897f505e4f
Meta-/ (tree-view:toggle) attaches / detaches the TreeView
2012-05-08 15:35:03 -06:00
Nathan Sobo
79315b0ef6
Merge branch 'master' of github.com:github/atom
...
Conflicts:
static/command-panel.css
2012-05-08 15:11:27 -06:00
Nathan Sobo
d181cdedbd
Handle errors when attempting to add a file from the TreeView
2012-05-08 15:08:15 -06:00
Corey Johnson
77baa7be09
Extract command panel as an extension
2012-05-08 13:49:06 -07:00
Nathan Sobo
a59c96d3a9
Flash red and show an error message when there's an error on moving a file
2012-05-08 14:18:21 -06:00
Corey Johnson
935ae3323e
Rename class var @treeView to @instance
2012-05-08 13:17:25 -07:00
Corey Johnson
cb45675f14
Remove @path var from project
2012-05-08 13:02:14 -07:00
Corey Johnson
545671a641
fs.isFile(path) returns false if given path does not exist
2012-05-08 13:02:14 -07:00
Nathan Sobo
b528196d1b
Refactor AddDialog and MoveDialog into a single Dialog class
2012-05-08 13:16:52 -06:00
Nathan Sobo
5645f76289
Merge branch 'master' of github.com:github/atom
2012-05-08 11:28:50 -06:00
Nathan Sobo
01add56985
Can move files to non-existent directories
2012-05-08 11:28:19 -06:00
Corey Johnson
8a921d2799
When the project's path changes, the TreeView's root directory updates.
2012-05-08 09:57:01 -07:00
Corey Johnson
f4c5536391
Add path-change event to Project
2012-05-08 09:45:39 -07:00
Corey Johnson
7e32d73d73
TreeView doesn't raise exceptions when RootView's project has no path.
2012-05-08 09:02:35 -07:00