Commit Graph

7370 Commits

Author SHA1 Message Date
Nathan Sobo
4ca00f7347 Simplify marker events
Instead of marker-added and marker-removed events which are emitted
when markers are created/invalidated/revalidated/destroyed, we now
just have marker-created events that are triggered *only* when markers
are created for the first time. The marker itself emits a 'destroyed'
event when it is destroyed. The marker already notifies observers when
its validation status changes, so that's covered.
2013-04-29 21:01:48 -06:00
Nathan Sobo
b2d34d93ab Emit 'marker-added/removed' events on DisplayBuffer 2013-04-29 21:01:48 -06:00
Nathan Sobo
78bb074c0d Add DisplayBufferMarker.inspect 2013-04-29 21:01:48 -06:00
Nathan Sobo
3a39c92ae4 Emit 'marker-added/removed' events when buffer marker validity changes 2013-04-29 21:01:48 -06:00
Nathan Sobo
883127f0d6 Emit 'marker-added/removed' when buffer markers are created/destroyed 2013-04-29 21:01:48 -06:00
Nathan Sobo
3b52cd018b Reduce documentation threshold
I deleted a bunch of documented methods. I haven't added any new
undocumented methods, but now there are fewer overall documented
methods, which is breaking the docs threshold spec. I don't think it
makes sense to start documenting non-related methods in this branch
right now.
2013-04-29 21:01:48 -06:00
Nathan Sobo
6f34d0b346 Document new methods 2013-04-29 21:01:48 -06:00
Nathan Sobo
b35bd36ec7 Get spell check specs passing with new marker api 2013-04-29 21:01:48 -06:00
Nathan Sobo
8c037bf425 Destroy markers properly in command panel operations 2013-04-29 21:01:48 -06:00
Nathan Sobo
ae5e07ddd6 Make bracket matcher work with new marker API 2013-04-29 21:01:48 -06:00
Nathan Sobo
b16529bf9f Use new marker API to get marker ranges in command panel operations 2013-04-29 21:01:47 -06:00
Nathan Sobo
db0676cc51 Use new API to destroy markers in snippets package 2013-04-29 21:01:47 -06:00
Nathan Sobo
2d1cb8b519 Fix selection spec to to check marker destruction properly 2013-04-29 21:01:47 -06:00
Nathan Sobo
3a11c56438 Add .isDestroyed method to markers 2013-04-29 21:01:47 -06:00
Nathan Sobo
caf34d6a3a EditSession.selectMarker checks if the marker is valid
Also, it returns the selected range if it's valid, and otherwise
returns a falsy value. This has more utility than just true/false.
2013-04-29 21:01:47 -06:00
Nathan Sobo
a028dff6e9 Add DisplayBufferMarker.isValid 2013-04-29 21:01:47 -06:00
Nathan Sobo
0563ee4a97 Make DisplayBuffer.findMarkers return DisplayBufferMarkers 2013-04-29 21:01:47 -06:00
Nathan Sobo
d466abdc64 Fix DisplayBuffer spec 2013-04-29 21:01:47 -06:00
Nathan Sobo
f4be899ae9 Switch EditSession over to object-oriented markers API 2013-04-29 21:01:47 -06:00
Nathan Sobo
5403bc647a Convert display buffer markers to object-oriented API 2013-04-29 21:01:47 -06:00
Nathan Sobo
482eb6c0de Give TextBuffer an object-oriented marker interface
The previous API revolved around methods on TextBuffer for querying
and manipulating markers based on their id. Now marker creation
methods return marker objects. These are still retrievable by id so
they can be dealt with across serialization boundaries in the future,
but you deal with them directly as objects.
2013-04-29 21:01:47 -06:00
Nathan Sobo
e02e4cd975 Add DisplayBuffer.findMarker[s] 2013-04-29 21:01:47 -06:00
Nathan Sobo
ac90b13032 Add missing Buffer.findMarker implementation 2013-04-29 21:01:46 -06:00
Nathan Sobo
64aaf670ed Add startRow and endRow special attributes to TextBuffer.findMarker[s] 2013-04-29 21:01:46 -06:00
Nathan Sobo
4a764c2d9d 💄 2013-04-29 21:01:46 -06:00
Nathan Sobo
0f0480b79f Add Buffer.findMarker[s], which returns marker[s] matching attributes 2013-04-29 21:01:46 -06:00
Nathan Sobo
df6feab346 Add Range.compare 2013-04-29 21:01:46 -06:00
Nathan Sobo
aef34c11b7 Use new DisplayBuffer.updateScreenLines method for .destroyFold 2013-04-29 21:01:46 -06:00
Nathan Sobo
0292ba959f Use the same code path for fold creation and tokenized buffer changes 2013-04-29 21:01:46 -06:00
Kevin Sawicki
58275a2f0a Use ems instead of pixels for loading octicon size 2013-04-29 18:23:10 -07:00
Kevin Sawicki
f0d3a06655 Mention dev mode fixes 2013-04-29 18:02:40 -07:00
Kevin Sawicki
0ce67b307c Remove unneeded resource path assignment
There is a fall back case after this that sets the resource
path to the bundle path if not already set.
2013-04-29 17:58:41 -07:00
Kevin Sawicki
598cdea22a Don't crash when running dev with no resource path
Previously if the --dev flag was used and no resource was
specified or found in ~/github/atom then the app would
crash trying to add a null resource path to the node paths
list.

Now the bundle resource path is the fallback whenever the
dev resource path cannot be found or does not exist.
2013-04-29 17:54:31 -07:00
Kevin Sawicki
32d23d6303 Allow Atom to be run in stable mode
Previously isDevMode was returning true when it was called
before the resource path was initially set forcing Atom to
always run in dev mode.

Now we just use the new isDevFlagSpecified() method to check
where the bundle resource path should be used.
2013-04-29 17:51:13 -07:00
Kevin Sawicki
3279a575f6 Reuse search when re-toggling find in project
Previously the prior find in file search was thrown
away when toggling find-in-project subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:25:07 -07:00
Kevin Sawicki
16ffbd1920 Reuse search when re-toggling find in file
Previously the prior find in file search was thrown
away when toggling find-in-file subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:24:44 -07:00
Corey Johnson
9180060920 Revert "Listen for mouse events on scrollView instead of renderedLines"
You can't listen on scroll view because that makes
it impossible to scroll using the scrollbar

Opens #464

This reverts commit fdae5fd89c.
2013-04-29 15:07:38 -07:00
Corey Johnson
fdae5fd89c Listen for mouse events on scrollView instead of renderedLines
It was not possible to click on the lower part of the last line
when the editor was scrollable and listening for mousedown events on renderedLines.

Closes #464
2013-04-29 14:59:23 -07:00
Corey Johnson
8e218de3e7 💄 2013-04-29 14:59:23 -07:00
Kevin Sawicki
a6c89b75fc Retain command panel text between toggles
Previously the mini editor was cleared on toggle but now
the existing text retained and selected when toggled.
2013-04-29 14:48:06 -07:00
Kevin Sawicki
15cf475d04 Use loading octicon in command panel
This removes the SVG spinner which had been incorrectly
rendering since the bootstrap upgrade due to box sizing
issues.
2013-04-29 14:13:21 -07:00
Corey Johnson & Kevin Sawicki
b56f4a129f Mention fixed freeze 2013-04-29 12:15:10 -07:00
Corey Johnson & Kevin Sawicki
0d8a6782b3 Stop tokenizing line when the same rule is pushed more than once
Previously Rails classes would infinitly loop if the Ruby on Rails
grammar was loaded but the Ruby grammar had not been. This occurred
because a rule was continually pushing itself on the stack but never
advancing.

Now if the position does not advance and the last two rules in the
stack have the same scope the last rule is popped and the entire line
is tokenized with the current scopes.

Closes #524 #486
2013-04-29 12:10:40 -07:00
Corey Johnson
fe219ed159 💄 2013-04-29 12:10:40 -07:00
probablycorey
6ee24cc50e 💄 2013-04-29 12:10:40 -07:00
Kevin Sawicki
5a84814e27 Undasherize the namespace when no event exists
This would present the new-window event as "New Window"
instead of "New-window".
2013-04-29 10:49:31 -07:00
Kevin Sawicki
994138c7a6 Mention meta-N command 2013-04-29 10:29:46 -07:00
Kevin Sawicki
df6809e705 Bind meta-N to open a new untitled editor 2013-04-29 10:27:39 -07:00
Kevin Sawicki
71aa9802d5 Move default keys from keymap.coffee to atom.cson 2013-04-29 10:11:21 -07:00
Kevin Sawicki
8b98a7793d Include Java grammar in fenced code blocks 2013-04-28 06:50:03 -07:00