Commit Graph

8526 Commits

Author SHA1 Message Date
Kevin Sawicki
c1ebbf36be Add missing l to global 2014-06-04 09:52:20 -07:00
Kevin Sawicki
8717547db4 Normalize resource path in remaining locations 2014-06-04 09:45:27 -07:00
Kevin Sawicki
7c4a32fffa Normalize resource path in AtomWindow constructor 2014-06-04 08:46:40 -07:00
Kevin Sawicki
b5703ff57a Normalize resource path before creating app
This ensures the drive letter case is consistent with the format
used by require.
2014-06-03 17:40:08 -07:00
Kevin Sawicki
41ab48bc6e Use path.join instead of path.resolve
This ensures the case of the path is consistent with how require resolves
paths.

Closes #2486
2014-06-03 17:19:00 -07:00
Corey Johnson
8e095d7b5b Merge pull request #2164 from steffengy/fix-indent
Fix indenting of HTML tags for instance. Fix #1294
2014-06-03 12:01:44 -07:00
Corey Johnson
dac792a243 Remove .editor class from ReactEditorView
ReactEditorView and EditorComponent were using the editor class. This
caused context menus that used `.editor` as the selector to display
twice.
2014-06-03 11:36:55 -07:00
Kevin Sawicki
31b3d8f967 Add missing require 2014-06-03 11:06:02 -07:00
Corey Johnson
ce527aea10 Pull out menu item building into seperate method 2014-06-03 10:51:46 -07:00
Kevin Sawicki
a7a9301f25 Quote all arguments to cmd.exe
This is required since the command or arguments may have spaces that will
be interpreted as separate arguments unless quotes surround it.

Closes #2231
Closes atom/symbols-view#37
2014-06-03 10:50:00 -07:00
Corey Johnson
950338ed22 Fix linter errors 2014-06-03 10:17:53 -07:00
Corey Johnson
8ed3b7a250 Merge pull request #2134 from erikhakansson/AdvancedContextMenu
Advanced context menu
2014-06-03 10:13:37 -07:00
Nathan Sobo
749dba1ac7 Prevent LinesComponent from updating on simple cursor movement 2014-06-03 19:23:19 +09:00
Nathan Sobo
a28566a559 Add ScrollbarCornerComponent::shouldComponentUpdate 2014-06-03 19:18:14 +09:00
Nathan Sobo
b47f6265c7 Move gutter width measurement into EditorComponent 2014-06-03 18:30:24 +09:00
Nathan Sobo
9511c952af 💄 2014-06-03 18:19:11 +09:00
Nathan Sobo
be0877327e Kill comment 2014-06-03 18:18:53 +09:00
Nathan Sobo
3134bfda95 Update selections when the font size or font family change 2014-06-03 17:43:57 +09:00
Nathan Sobo
3aefa53b33 Batch together line and character width measurement after font changes
This ensures we only perform a single update with the most up-to-date
information about line height, default character width, and specific
character widths. If this update causes more lines to be drawn we may
measure again, but not necessarily.
2014-06-03 17:43:56 +09:00
Nathan Sobo
4fd07a4cf3 Subscribe to scroll view DOM events in ::listenForDOMEvents 2014-06-03 17:43:56 +09:00
Nathan Sobo
03463da729 Allow Editor::batchUpdates calls to be nested 2014-06-03 17:43:56 +09:00
Nathan Sobo
1cc5ef3479 Update selections when the line height changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
77f78d0a11 Update cursors component if the defaultCharWidth changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
8f98f2368b Base gutter updates on defaultCharWidth instead of fontSize/Family 2014-06-03 17:43:56 +09:00
Nathan Sobo
f467e3eed4 Move decision to measure lineHeight/charWidths to EditorComponent
This prevents the double-update of the lines component when changing
the font-size, line-height and font-family. We detect the update of
these values in the root component and trigger a measurement. If the
measurement determines that the pixel values have changed, *then* we
update the lines.
2014-06-03 17:43:56 +09:00
Nathan Sobo
3052fe3f3b Update cursors when the line height in pixels changes 2014-06-03 17:43:56 +09:00
Nathan Sobo
1bce626324 Compute ranges of cursors & selections in EditorComponent and pass down
Previously, SelectionsComponenet::shouldComponentUpdate was storing the
ranges for selections as a side effect. We also were passing boolean
values (cursorMoved and selectionUpdated) to determine if these
components should update.

Now, we compute a simple hash of screen ranges for selections and
cursors in the root component and pass them down. This simplifies
shouldComponentUpdate for selections and allows us to implement one
for cursors.
2014-06-03 17:43:55 +09:00
Nathan Sobo
e222998f82 Only compare screenRow to mouseWheelScreen row when it is defined
Fixes #2482
2014-06-03 17:43:35 +09:00
Kevin Sawicki
0245ec28eb Always handle resolving absolute URIs 2014-06-02 15:45:47 -07:00
Kevin Sawicki
94f86cb461 Don't resolve uris when project has not path 2014-06-02 15:41:05 -07:00
Kevin Sawicki
918c86476c Check for href attribute on currentTarget
This makes clicking on images wrapped in anchor tags open correctly.
2014-06-02 13:35:18 -07:00
Kevin Sawicki
4d65a220e2 Add support for a ATOM_DEV_RESOURCE_PATH env var
This is helpful on windows to set a default dev resource path that
isn't ~/github/atom since on Windows it is common to clone Atom to C:\atom
2014-06-02 12:38:33 -07:00
Kevin Sawicki
4c2931f6b5 Use forward slash on all platforms
Paths are normalized by git-utils to use / on all platforms
2014-06-02 10:17:13 -07:00
Corey Johnson
3f549bbada Merge pull request #2477 from atom/ns-react-remove-scroll-view-component
Merge EditorScrollViewComponent into EditorComponent
2014-06-02 08:02:49 -07:00
Nathan Sobo
1187d50b81 Fix inequality in LinesComponent::shouldComponentUpdate
Change objects from the display-buffer are currently end-row inclusive.
I'd like to fix this, but not until we switch editors.
2014-06-02 19:17:30 +09:00
Nathan Sobo
afe386ce40 💄 EditorComponent method order 2014-06-01 18:31:47 +09:00
Nathan Sobo
d31669c67f Merge EditorScrollViewComponent into Editor
I don't think that this component was really carrying its weight. Its
render function basically passed through directly to other components
that updated between renders, but didn't contain any content on its
own that actually changed after the first render.

React components seem to carry overhead, so I want every component we
use to count. Also, I'm considering circumventing some of React's
standard update logic for performance reasons, and making the structure
more shallow will help with that.
2014-06-01 15:24:59 +09: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
2548891b99 Clear the mousewheelScreenRow even if the event does not cause scrolling
If a mousewheel event is triggered when the editor can't be scrolled,
we still want to clear the mouseWheelScreenRow. This is typically done
when we stop scrolling, but if we never start scrolling it will never
happen. This commit adds another timeout to cover that case.
2014-05-31 18:36:59 +09:00
Nathan Sobo
0043072ecf Only preserve mouseWheelScreenRow if it's out of the rendered row range
Fixes #2429, #2443

Otherwise, it's possible to duplicate lines. If a line is in the
rendered row range and it's not in the set of lines returned by the
editor, we should remove it no matter what. Line preservation is only
intended for lines that are out of view.
2014-05-31 08:56:57 +09:00
Nathan Sobo
89c57b6d52 Only set the mouseWheelScreenRow when scrolling vertically
When we handle a mousewheel event targeting a line or line number, we
assign the mousewheelScreenRow to prevent the removal of the target
node, which interferes with velocity scrolling.

However, the ::mousewheelScreenRow is only cleared 100ms after we stop
scrolling vertically. This means that if we're only scrolling
horizontally, it's never cleared. This causes the line node associated
with this screen row to hang around longer until the mousewheel screen
row is cleared again, which is not what we want.

This commit only assigns the ::mousewheelScreenRow when scrolling
vertically, so we can be sure it will be cleared.
2014-05-31 08:56:57 +09:00
Nathan Sobo
f2a08cd178 Update the lines and gutter when the mouseWheelScreenRow changes 2014-05-31 08:56:56 +09:00
Nathan Sobo
df524e4803 Fix bug in LinesCompoent::shouldComponentUpdate 2014-05-31 08:56:32 +09:00
probablycorey
2df2254227 Remove trailing semi-colon
I drank too much javascript today…
2014-05-30 15:10:44 -07:00
probablycorey
f4d256eef2 Use buffer row data attribute to find gutter lines 2014-05-30 15:05:15 -07:00
probablycorey
cb109dc09f Add buffer-row data to gutter-component 2014-05-30 15:04:50 -07:00
Corey Johnson
d2d63d3241 Merge pull request #2431 from atom/cj-add-tokenized-event
Use tokenized event to determine tab style
2014-05-29 15:19:14 -07:00
Corey Johnson
4840987082 Add overlayer class to ReactEditorView
Closed #2442
2014-05-29 15:16:48 -07:00
Corey Johnson
40a2ed3703 Merge pull request #2364 from themaninthesuitcase/cp-projectRelativeTabPath
Update getLongTitle to be project relative
2014-05-29 09:51:45 -07:00
probablycorey
7f57a094f6 Determine softTab state after the buffer is tokenized. 2014-05-28 16:31:00 -07:00