Commit Graph

8336 Commits

Author SHA1 Message Date
Corey Johnson
14a430b939 Merge pull request #2128 from alfredxing/body-fullscreen-class
Add `fullscreen` class to body when in full screen
2014-05-09 11:36:39 -07:00
Nathan Sobo
ce5c29fb47 Base the visible lines on the height instead of the clientHeight
Because overlay scrollbars are invisible unless scrolling and even
regular scrollbars can be transparent.
2014-05-09 11:33:04 -06:00
Nathan Sobo
f0fd48202c Refresh scrollbars when overlay/classic style preferences changes 2014-05-09 11:33:04 -06:00
Nathan Sobo
d5eb8c21b2 Only refresh editor scrollbars on stylesheet changes that require it
If a stylesheet is added or removed, we check if it contains a selector
for scrollbars before refreshing anything.
2014-05-09 11:33:04 -06:00
Nathan Sobo
76b9982e04 Emit stylesheet-added/removed from ThemeManager w/ CSSStyleSheet objects
This enables subscribers to detect not just that stylesheets have
changed, but specifically how they have changed. This is used by the
React editor component to only refresh scrollbars when a stylesheet
that actually contains selectors for scrollbar elements is added or
removed.
2014-05-09 11:33:04 -06:00
Nathan Sobo
ca7f11f7d0 Default scrollbar height/width to 15 when it's measure as 0
A 0 measurement indicates that overlay scrollbars are enabled, so we
just fall back to 15px in that case so the user can hover directly over
the scrollbar to scroll.
2014-05-09 11:33:04 -06:00
Nathan Sobo
1c1ace90db Hide and show scrollbars before measuring them after stylesheet changes
We measure the scrollbar-corner node when there's a stylesheet change,
but Chromium won't apply the new style if it was already visible before
the change. This commit hides and shows it before measuring so we get
accurate values.
2014-05-09 11:33:04 -06:00
Nathan Sobo
bdd605e85b Explicitly assign dummy scrollbars to the correct width/height
Previously, dummy scrollbars were always 15px wide/tall. This caused
them to obscure the ability to click for the entire 15px region, even if
the actual scrollbar was styled to be much thinner. Now we explicitly
measure the size of scrollbars on mount and when the stylesheets change
and set the height/width explicitly.
2014-05-09 11:33:04 -06:00
Nathan Sobo
e1b4b921ba Hide scrollbar when not scrollable in a given direction 2014-05-09 11:33:04 -06:00
Nathan Sobo
ab1ede5fe6 Add a dummy scrollbar corner
Horizontal / vertical scrollbars render a 'corner' on the lower right
when they would otherwise overlap. I previously relied on drawing both
dummy scrollbars at their full width/height so the corner got rendered,
but that interfered with the display of the horizontal scrollbar in
certain circumstances because it was too wide to scroll. This commit
provides that behavior with an absolutely positioned div with the same
dimensions as the intersection of scrollbars when both are visible.
2014-05-09 11:33:04 -06:00
Nathan Sobo
dbd271f70a Don't obscure last character of long lines with vertical scrollbar
This entailed quite a few changes to dial in scrollbars. The scrollbars
are now adjusted in size to account for the width of the opposite
scrollbar. If the width or height are not explicitly constrained and we
are scrollable in the opposite direction that is constrained, we account
for the width of the opposite scrollbar in assigning a natural height
or width based on the content.
2014-05-09 11:33:04 -06:00
Nathan Sobo
527ada47f9 Account for gutter width in scrollWidth of horizontal scrollbar
Because the scrollbar now spans the entire editor but the scrollable
area does not include the gutter, we need to add the current width of
the gutter to the scroll width of the horizontal scrollbar to allow
it to scroll to the end of the longest lines.
2014-05-09 11:33:03 -06:00
Nathan Sobo
b5f910ad06 Update line number padding when max digits changes 2014-05-09 11:33:03 -06:00
Nathan Sobo
e412371b88 Remove logging 2014-05-09 11:33:03 -06:00
Nathan Sobo
7b4bc16531 Fix specs that broke when accounting for horizontal scrollbar height 2014-05-09 11:33:03 -06:00
Nathan Sobo
e6df30e94c Respect horizontal scrollbar when rendering the vertical, and vice versa
We set overflow to hidden in the opposite scroll direction only if we
can't actually scroll in that direction, causing the white square where
neither scrollbar overlaps to appear at the lower right corner.
2014-05-09 11:33:03 -06:00
Nathan Sobo
d9ba9262bf Update scrollTop to valid position when scrollbar disappears 2014-05-09 11:33:03 -06:00
Nathan Sobo
c4be32a5dd Revert "Revert "Don't obscure the last line of the editor with the horizontal scrollbar""
This reverts commit 1d634e471e.
2014-05-09 11:33:03 -06:00
Kyle Filz
f9fe5efbb0 Fix running .cmd stubs through BufferedProcess
ChildProcess.spawn only will run .exe files on Windows, not .cmd, .bat,
.anythingElse.

See joyent/node#2318 for more information.
2014-05-09 09:04:36 -05:00
Alfred Xing
839cad0c2a Add fullscreen class to body when in full screen
Add a `fullscreen` class to body when full screen is triggered, as suggested
by @orderedlist in #1694
2014-05-08 20:36:46 -07:00
Corey Johnson
9aa2df7cee Merge pull request #2059 from bradgearon/master
append .cmd to apm in package-manager.coffee if platform is win32
2014-05-08 15:14:36 -07:00
Corey Johnson
a649d75ab8 Merge remote-tracking branch 'origin/master' into cj-tabs-be-weird
Conflicts:
	package.json
2014-05-08 14:36:50 -07:00
Brad Gearon
e945b83318 remove os require use process.platform instead 2014-05-08 12:38:35 -05:00
Kevin Sawicki
38bd996996 Merge pull request #2052 from AngelEzquerra/ignore_mercurial_files
Add mercurial directories to default list of ignored names
2014-05-08 19:23:40 +02:00
Lee Dohm
9b49c2f987 📝 Some simple documentation fixes 2014-05-07 22:38:51 -07:00
Brad Gearon
d99c9edc43 append .cmd to apm in package-manager.coffee if platform is win32
avoids NOENT error when searching for packages
2014-05-07 18:35:05 -05:00
Angel Ezquerra
67de17e0c3 Add mercurial directories to default list of ignored names
atom already ignored git and svn directories. It makes sense to ignore
mercurial (.hg) directories as well.
2014-05-07 23:56:29 +02:00
probablycorey
6bb260140b Don't use comment lines to determine soft/hard tabs.
Closes atom/language-php#24
Closes #1733
2014-05-07 12:18:05 -07:00
Kevin Sawicki
5e0f132d33 Merge pull request #1991 from evinugur/master
ignore Thumbs.db in workspace-view and in actual atom gitignore
2014-05-07 09:05:56 -07:00
Pascal Borreli
7070ed8ae4 Fixed typos 2014-05-07 08:52:58 +01:00
Cheng Zhao
f0bd3b1c20 Ignore the "paste" event, fixes #1945.
Somehow on Linux the "paste" event is emitted when user presses ctrl-v,
even if the ctrl-v has been captured by window event handler. This
should be a bug of Chromium.
2014-05-07 10:39:01 +08:00
Evin Ugur
cb0ba55871 ignore Thumbs.db in workspace-view and in actual atom gitignore 2014-05-06 21:24:11 -04:00
Kevin Sawicki
c75d36ef93 Implement application:open-license in AtomWindow
Allows the LICENSE.md file to be opened even when no windows are
open.

Closes #1624
2014-05-05 15:54:47 -07:00
Kevin Sawicki
3dbdaee25c Merge pull request #1898 from atom/open-source-release
Open Source Atom
2014-05-05 12:59:19 -07:00
Kevin Sawicki
8b5fd64dd4 Guard against PaneAxis as first child
Pane::findLeftmostSibling expected to return a Pane, not a PaneAxis
2014-05-05 11:28:36 -07:00
Kevin Sawicki
1c514bdc6b Split right when rightmost sibling is an axis
This was previously throwing an error when Workspace::open was called
with a split: right option and the rightmost sibling was a PaneAxis
since it was assuming findOrCreateRightmostSibling was always returning
a Pane, not a PaneAxis.
2014-05-05 11:28:36 -07:00
Kevin Sawicki
8ec7d1273c Cache handlerPath 2014-05-01 17:05:47 -07:00
Kevin Sawicki
7ffc5cc02b Terminate task before recreating 2014-05-01 17:05:28 -07:00
Kevin Sawicki
66943c4820 Add application:open-safe command
This opens a new "safe mode" window similar to the application:open-dev
command
2014-05-01 15:20:22 -07:00
Kevin Sawicki
4ed9e34893 Tweak option description 2014-05-01 15:20:22 -07:00
Kevin Sawicki
4f4da78e54 Add --safe argument
This will launch Atom in "safe" mode where packages from ~/.atom
will not be loaded automatically or be resolveable by name.
2014-05-01 15:20:22 -07:00
Kevin Sawicki
dd74280146 Set status to 0 if it is ignored
The statuses obtained via the background task do not include ignored
entries so don't put ignored entries into the cache when checking the
status individually.

This was causing the fuzzy finder to show ignored paths in the status
list view after an ignored file was saved.
2014-05-01 14:20:46 -07:00
Corey Johnson
7d3abda86f Fix Workspace::openLicense 2014-04-30 16:38:44 -07:00
Kevin Sawicki
cf62d3212c Use path.join instead of hard-coded separator 2014-04-30 16:07:26 -07:00
Kevin Sawicki
b260cbb43a Call open on model instead of view 2014-04-30 16:07:26 -07:00
Kevin Sawicki
1367f08de8 Parse initial column from path to open argument 2014-04-30 16:07:26 -07:00
Kevin Sawicki
27b02a7981 Add initialColumn options to Workspace::open
This options works similarly to the existing initialLine option
2014-04-30 16:07:26 -07:00
Kevin Sawicki
a4ee412e96 Remove Math.max corrections to range
Editor::getTextInBufferRange will clip the specified range instead.
2014-04-30 09:58:37 -07:00
Kevin Sawicki
4f655d7de5 📝 Update comment to match behavior 2014-04-30 09:58:37 -07:00
Kevin Sawicki
aa4749f175 Select all adjacent whitespace on double click
Cursor::isSurroundedByWhitespace was use column 0 instead of the
position right before the cursor.
2014-04-30 09:58:37 -07:00