Nathan Sobo
174c4e18cc
Fix scrolling misbehavior and display artifacts.
...
Switching back to the new flexbox and re-introducing a scrollable-content node that the flexbox is applied to. This has no height settings so it grows to contains the gutter and lines. The editor outside of it has a width / height of 100% of its container plus overflow-y of scroll. Trying to apply flexbox AND a 100% height + scroll all to the editor causes display artifacts.
2012-03-16 05:41:43 -06:00
Corey Johnson & Nathan Sobo
fd5439f357
Simplify layout and prevent scrollbar flash when toggling file finder.
2012-03-15 17:18:26 -06:00
Nathan Sobo
0efee25ded
Cleanup keybindings after app spec.
2012-03-15 16:22:02 -06:00
Nathan Sobo
6bdba313d1
Don't add to the same window to the atom.windows array twice
2012-03-15 16:10:55 -06:00
Nathan Sobo
60056e57fb
Use an editor in the file finder instead of an input element.
2012-03-15 13:41:37 -06:00
Nathan Sobo
3515591d58
Fix bug where you couldn't use backspace, delete, arrow keys in file finder.
...
Bind all these movement keys only to editor for now, because they're interfering with the default input behavior.
2012-03-14 19:17:32 -06:00
Nathan Sobo
04fce8067f
Add some temporary logging to debug intermittent spec failure.
2012-03-14 19:15:59 -06:00
Nathan Sobo
8b0d79b589
Don't call shutdown on close event. The window is closing anyway.
2012-03-14 19:00:31 -06:00
Nathan Sobo
f88bfc1ab0
Use _.remove to remove windows from atom.windows array
2012-03-14 19:00:15 -06:00
Nathan Sobo
601cf41108
Fix bug where file-finder pushed editor up.
...
For now, I'm removing the flexbox treatment of #app-vertical because the file finder just needs to overlay the bottom and absolute positioning is simpler. I'm also using requireStylesheet to load the file finders CSS instead of a link tag.
2012-03-14 18:28:23 -06:00
Nathan Sobo
5bf9925d0a
Unsubscribe from Buffer when an Editor is removed from the DOM.
2012-03-13 19:20:40 -06:00
Nathan Sobo
8cd0b23cd4
Fix bug where render ids were NaN
2012-03-13 19:20:12 -06:00
Nathan Sobo
eb92966acd
Fully unsubscribe from previous buffer when setting a new buffer
2012-03-13 19:05:48 -06:00
Nathan Sobo
5e5a5bdfa5
Add EventEmitter.subscriptionCount
2012-03-13 19:05:24 -06:00
Nathan Sobo
e1283e1788
Add event namespacing to EventEmitter.
2012-03-13 18:17:43 -06:00
Nathan Sobo
4c79b43c52
Add _.remove, which removes an element from an array in place
2012-03-13 18:17:27 -06:00
Nathan Sobo
da3e1d4553
Every Buffer gets its own UndoManager.
2012-03-13 16:24:12 -06:00
Nathan Sobo
7d2d0f2037
Add a drop shadow to gutter when horizontal scroller is scrolled right.
2012-03-13 16:09:11 -06:00
Nathan Sobo
5709b0d152
Now we can force line wrapping in specs without editor being on the DOM.
2012-03-13 15:56:24 -06:00
Nathan Sobo
06a3f3d376
Fix exception when auto-indenting after fold placeholder.
...
Propagate state when splitting and concatenating screen line fragments, because we were passing an undefined state to the auto-indenter.
2012-03-13 15:50:43 -06:00
Nathan Sobo
826bf6ec61
Editor recalls cursor position and scroll state when a previously edited buffer is re-assigned.
2012-03-13 15:25:20 -06:00
Nathan Sobo
a96e09f6d1
When soft wrap is on, don't position hidden input beyond width of horizontal scroller.
2012-03-13 12:14:08 -06:00
Nathan Sobo
8d432c02c1
Fix bug where text typed into empty buffer was on the wrong line.
2012-03-13 12:12:52 -06:00
Nathan Sobo
43fbfba68d
💄
2012-03-12 19:47:25 -06:00
Nathan Sobo
f7b9cf42d7
Slight optimization: Pull reference to @lines[0] in loop into a variable
2012-03-12 19:47:12 -06:00
Nathan Sobo
1dee39042e
Assign innerHTML properly on the element underlying the jQuery wrapper
2012-03-12 19:30:31 -06:00
Nathan Sobo
9d0f1bc3f7
Refresh line numbers in gutter by setting innerHTML for speed
2012-03-12 19:15:19 -06:00
Nathan Sobo
5529a0e527
Build all lines numbers as a single chunk of html
2012-03-12 18:56:58 -06:00
Nathan Sobo
0a38793450
Use a DocumentFragment to insert all lines at once
2012-03-12 18:51:43 -06:00
Nathan Sobo
9a618ccb5e
Use raw DOM api to insert lines to avoid slow jQuery.clean
2012-03-12 18:15:39 -06:00
Nathan Sobo
fa971d1e75
Render multiple lines in a single fragment
2012-03-12 16:40:14 -06:00
Nathan Sobo
86cc45f4da
Add Editor.spliceLineELements
2012-03-12 14:21:00 -06:00
Corey Johnson
f7be856f2f
Cache line elements in Editor.
...
Shaves off 30ms
2012-03-09 15:30:21 -08:00
Corey Johnson
8e97fbd5ed
document.title is set as the window title
2012-03-09 11:02:08 -08:00
Nathan Sobo
99f659fd58
Don't clip screen positions that are directly translated from buffer positions.
...
The translation process is guaranteed to return a valid screen position so there's no need to clip the position again.
2012-03-09 10:31:57 -07:00
Nathan Sobo
036902a3cc
Only clipToBounds in translatePosition when calling it from clipPosition
2012-03-09 10:15:51 -07:00
Nathan Sobo
9aaee17ee7
Use querySelectorAll in getLineElement
...
querySelector only returns a single element, which won't work.
2012-03-08 19:54:38 -07:00
Nathan Sobo
53c84137e1
Revert "Use DOM's querySelector instead of JQuery's Swizzle for getLineElement"
...
Broke the build
This reverts commit 9be4dd5053 .
2012-03-08 19:45:20 -07:00
Nathan Sobo
d21063be9b
Merge branch 'master' of github.com:github/atom
2012-03-08 19:32:32 -07:00
Nathan Sobo
5c23509f90
Use type-explicit copy methods instead of _.clone when we know the type
2012-03-08 19:32:18 -07:00
Nathan Sobo
d622c84bd1
Freeze cursor positions instead of always returning a copy
2012-03-08 19:31:40 -07:00
Corey Johnson
9be4dd5053
Use DOM's querySelector instead of JQuery's Swizzle for getLineElement
2012-03-08 18:26:06 -08:00
Corey Johnson & Nathan Sobo
4bf10ab7c2
Gutter isn't updated when a single screen line is modified.
2012-03-08 15:19:57 -08:00
Corey Johnson & Nathan Sobo
7854b99bed
Remove unnecessary code
2012-03-08 14:27:22 -08:00
Corey Johnson & Nathan Sobo
60affb5d55
Defer cursor auto-scrolling until next tick.
...
Reading the DOM causes a reflow, which slows down character insertion.
2012-03-08 14:04:54 -08:00
Nathan Sobo
d6a927563b
Refresh cursor screen position only when folding / wrapping, not when typing
...
Changes to the buffer will cause the cursor to move anyway, so there's
no sense refreshing its position only to move it. This shaves us from
~18.5ms to ~13.5ms on the insert and delete character benchmark.
2012-03-08 13:05:53 -07:00
Nathan Sobo
07b9b42360
Only append a non-breaking space if a line contains no normal characters
2012-03-08 12:59:38 -07:00
Nathan Sobo
ee2ceb6bcb
Always render a non-breaking space at the end of screen lines
...
This ensures that if the line only contains a placeholder that it still
has a single character to keep the line div at a consistent height with
other lines.
2012-03-08 12:20:28 -07:00
Nathan Sobo
6d303aad18
Add a horizontal-scroller to address selection issues when scrolled right
...
The lines element is now display: table and contained inside of the
scroller. This means the lines element always expands to contain all
lines, which allows absolute positioning inside of it to be relative to
the entire scroll contents, not just to the currently visible area.
2012-03-08 11:23:05 -07:00
Corey Johnson & Nathan Sobo
f44a9df701
Add benchmark for inserting and deleting a character
2012-03-07 19:07:56 -07:00