Kevin Sawicki
1db21c91cc
Give first line regex the required amount of lines
...
Certain bundles require multi-line matches in the firstLineMatch
value so count the number of newlines in the regex and only test
the regex against only those lines.
2013-02-20 15:11:07 -08:00
Kevin Sawicki
881efd9c5d
Restore selection when undoing an insert newline below
2013-02-20 14:09:40 -08:00
Kevin Sawicki
af58c1e83f
Bind meta-shift-enter to insert newline above current line
...
Closes #292
2013-02-20 13:44:30 -08:00
Corey Johnson
e0212ba02b
Only use the first line when determine the syntax via file contents
2013-02-20 12:46:53 -08:00
Kevin Sawicki
27f44fbfd7
Invalidate empty lines proceeding a change event
...
The indent guide on empty lines will now be updated when
the non-empty line preceeding the empty lines is updated.
2013-02-20 12:20:15 -08:00
Kevin Sawicki
101b1aba12
Add indent guide to editor
...
The guide displays a continuous vertical line across lines with
the same indent levels.
Closes #50
2013-02-20 12:20:15 -08:00
Kevin Sawicki
932f2c4603
Use RootView.eachEditor to attach snippet commands
...
Previously the 'editor:attached' was used which would not
fire for editors already attached and so any editors
opened before the snippets package was loaded would not
have snippets enabled.
2013-02-20 12:06:03 -08:00
Corey Johnson & Nathan Sobo
5c1fb99037
Requiring window no longer has no side-effects
...
Call window.setUpEnvironment instead.
2013-02-20 11:44:39 -08:00
Corey Johnson & Nathan Sobo
2123fabae6
Window is only shutdown if a rootView and project exist
...
Keeping the shutdown state as a local var in window.coffee causes spec failures because window.shutdown can only be called once in the entire spec suite
2013-02-20 11:31:36 -08:00
Corey Johnson & Nathan Sobo
b24a13991a
Make sure window.shutdown is only called once
2013-02-20 10:18:19 -08:00
Corey Johnson & Nathan Sobo
43aa1aaeb7
Rename startApplication to startup and stopApplication to shutdown
2013-02-20 10:02:16 -08:00
Corey Johnson & Nathan Sobo
f5ecaf436e
Move core:close into handleWindowEvents
2013-02-20 09:58:34 -08:00
Corey Johnson & Nathan Sobo
cb1e48bfef
Make toggle-dev-tools command work in spec window
2013-02-20 09:58:00 -08:00
Kevin Sawicki
d9eba58698
Create default project/root-view if deserialization fails
...
If either fails to deserialize from the persisted state
then fall back to the default constructors.
This ensures Atom will still start even if the serialization
format changes and the previous stored state can no longer
be successfully deserialized.
2013-02-19 22:45:26 -08:00
Kevin Sawicki
9c372fa9bf
Load text package before deserializing path state
...
This is required for any editors that are deserialized
since a fallback grammar is always needed.
2013-02-19 21:55:23 -08:00
Kevin Sawicki
6047590544
Register deserializer for Project class
2013-02-19 21:53:48 -08:00
Kevin Sawicki
3532631002
Remove unused require
2013-02-19 21:12:58 -08:00
Kevin Sawicki
dedde7b222
Only add newline when insert row exceeds last row
...
Previously if the line before a trailing newline was
duplicated an extra newline would inserted with the
duplicated line.
2013-02-19 21:02:25 -08:00
Kevin Sawicki
d27bbee37d
Support selecting editor lines from the gutter
...
Mouse events that occur in the gutter are forwarded to the
rendered lines with the y-coordinate translated to be the
leftmost pixel of the editor to simulate the event originating
from column 0 of the current line row.
Closes #287
2013-02-19 18:16:29 -08:00
Nathan Sobo
a6ae1fc44e
Load user keymaps after packages so they can win
2013-02-19 18:29:00 -07:00
Corey Johnson & Nathan Sobo
47aa74133f
Remove unneeded calls to rootView.deactivate
2013-02-19 18:26:51 -07:00
Corey Johnson & Nathan Sobo
9e8831f710
RootView.initialize no longer assigns window.rootView or calls open
2013-02-19 18:26:50 -07:00
Corey Johnson & Nathan Sobo
0b5ea8578f
Eliminate rootView.project references.
2013-02-19 18:26:50 -07:00
Nathan Sobo
7f2747ead0
Make project a global and refactor startup process
2013-02-19 18:26:50 -07:00
Corey Johnson & Kevin Sawicki
e4f87d522f
Rename Task.terminate to Task.abort
2013-02-19 10:57:04 -08:00
Corey Johnson & Kevin Sawicki
7db83662b5
Only terminate worker after the worker completes work
2013-02-19 10:57:04 -08:00
Nathan Sobo
9cd6fda3e1
💄 add trailing newlines
2013-02-19 10:02:09 -07:00
Nathan Sobo
7bdd51b456
Rename deserializeView to deserialize
...
In additional, rename `registerViewClass(es)` to `registerDeserializer(s)`.
This moves us to a situation where any kind of object may want to be
deserialized, not just views.
2013-02-19 09:48:40 -07:00
Nathan Sobo
d3c2623b61
Make deserializeView a global method
...
…along with `registerViewClass(es)`
2013-02-18 18:08:18 -07:00
Kevin Sawicki
10430842b0
Use binary icon for .woff and .DS_Store extensions
2013-02-16 09:54:20 -08:00
Kevin Sawicki
54812a6ff8
Bind l to insert link in markdown
2013-02-15 15:18:13 -08:00
Kevin Sawicki
2910f7798a
Always use global rootView object
...
This removes the last few places where rootView was
looked up via jQuery selector and instead just uses
the rootView property available on the window.
2013-02-15 09:56:03 -08:00
Kevin Sawicki
f730672e9d
Use ? instead of or
2013-02-15 09:56:03 -08:00
Nathan Sobo
69da0bb2aa
Add alt-meta-left and alt-meta-right bindings for tab switching
...
These are common bindings for switching tabs. Before we used them to
split views, but this is a more expected behavior.
2013-02-15 10:39:15 -07:00
Nathan Sobo
a300337557
Change split-view bindings to avoid confusion w/ tab-switching
...
Now you can use the vim-style `ctrl-w *` bindings, or use `ctrl-|` and
`ctrl--`, which resemble horizontal and vertical splits as characters.
2013-02-15 10:39:15 -07:00
Kevin Sawicki
ef4449d1ed
Don't store package state in command-panel package
...
The package loader now only calls serialize if activate
has been called and reuses the previous state if the package
is never activated.
2013-02-14 17:30:45 -08:00
Kevin Sawicki & Nathan Sobo
992fbaafbc
Recycle bracket highlight views
2013-02-14 18:08:26 -07:00
Corey Johnson
35ff2744ac
Attach the tree view if the project has no serialized state
2013-02-14 16:40:24 -08:00
Corey Johnson
e7a8e4e3c4
Add atom.update and atom.getUpdateStatus
2013-02-14 16:40:24 -08:00
Kevin Sawicki & Nathan Sobo
3bd98ff182
Calculate pixel position of both bracket highlights before adding them
...
Before, we were causing a layout to occur twice because we needed to
read the DOM for the pixel position of the second highlight view after
invalidating the DOM when adding the first highlight view.
2013-02-14 17:30:08 -07:00
Kevin Sawicki
1f9e5aea06
Clear mini editor when detaching
2013-02-14 14:36:27 -08:00
Kevin Sawicki
77e9377865
Close command panel on core:cancel event
2013-02-14 12:49:33 -08:00
Nathan Sobo
2f71ee9a0d
Prevent clicks on a focused editor from unfocusing its hidden input
...
This closes #233 . When an editor is focused, what's *actually* focused
is a hidden input element inside the editor. So clicking on a focused
editor was temporarily stealing focus away from the hidden input, and
then moving it back to the hidden input (which the editor always does
when it is focused). Returning false from the mousedown handler when
the editor is already focused prevents this bouncing of focus and
prevents the fuzzy finder from hiding when you click its editor.
2013-02-14 13:38:46 -07:00
Kevin Sawicki
aa69452552
Focus rootView directlly instead of by selector
2013-02-14 12:31:12 -08:00
Kevin Sawicki
15c02014f7
💄
2013-02-14 12:27:46 -08:00
Kevin Sawicki
363a1bbbab
Remove unused require
2013-02-14 12:27:39 -08:00
Corey Johnson & Nathan Sobo
da59459197
Autoscroll the last cursor when it inserts text
...
Normally, we don't autoscroll to a cursor when the buffer changes. But
this is a change caused by the cursor itself, so it makes sense to
keep it in view.
2013-02-14 13:21:39 -07:00
Kevin Sawicki
1fed183a8c
Perform whitespace check after scopes check
2013-02-14 11:48:03 -08:00
Kevin Sawicki
e0556d85af
Advance over tokens that are only whitespace
2013-02-14 11:47:07 -08:00
Kevin Sawicki
21a56b991c
Move scroll logic to individual views
2013-02-14 11:25:08 -08:00