Commit Graph

7387 Commits

Author SHA1 Message Date
Nathan Sobo
cef25898bb Properly unsubscribe DisplayBuffer from Buffer on destruction 2013-04-30 18:14:53 -06:00
Nathan Sobo
0dea901368 Use instance method 2013-04-30 18:14:31 -06:00
Nathan Sobo
9086171f45 💄 2013-04-30 18:14:13 -06:00
Nathan Sobo
9aec992693 Hold marker [in]validation events until after buffer change events
For a while, the goal has been to prevent marker update events from
firing until after the buffer change event. But at the same time, we
want all the markers to be updated when the buffer change fires. This
commit irons out some issues for markers that are invalidated or
revalidated by the change, making their behavior consistent with the
rest of marker updates.
2013-04-30 17:37:28 -06:00
Nathan Sobo
40512a4823 Don't update the DisplayBuffer when a fold's marker changes
Because we don't currently allow for direct manipulation of fold
marker ranges, if a fold's marker changes it will be because of a
buffer change. This buffer change will bubble to the display buffer
anyway, where the screen line update will account for the change to
the fold's marker range.
2013-04-30 15:07:37 -06:00
Nathan Sobo
2e77f0ed7d Eliminate special behavior for changes straddling start / end of folds
Previously, we were attempting to preserve the fold and adjust in an
intuitive way in the face of changes that straddled the beginning or
the end of the fold. That added complexity… we would have to add a new
marker invalidation strategy to support it and I'm not convinced it's
actually a big deal to destroy folds in the face of straddling changes.
So that's what we do now.
2013-04-30 14:28:42 -06:00
Nathan Sobo
56a9316a28 Fix docs references 2013-04-30 11:37:31 -06:00
Nathan Sobo
7d676f51bd Document TextBuffer.getMarker[s] 2013-04-30 05:12:43 -06:00
Nathan Sobo
7ca8e31087 Document Fold methods 2013-04-30 05:12:13 -06:00
Nathan Sobo
029d8b58db Remove outdated method 2013-04-30 04:58:02 -06:00
Nathan Sobo
160a336b48 Fix command interpreter spec 2013-04-30 04:57:08 -06:00
Nathan Sobo
1ecd195e6e 💄 2013-04-30 04:53:26 -06:00
Nathan Sobo
9f8a07fc27 Fix some edit session specs. The remaining failures are less trivial. 2013-04-30 04:43:28 -06:00
Nathan Sobo
1f3e3c698f Add DisplayBuffer.foldsStartingAtBufferRow 2013-04-30 04:37:11 -06:00
Nathan Sobo
1f9e33d995 WIP: Base folds on markers.
Still a couple of specs failing on this for changes that straddle the
start / end of a fold. We need a new marker invalidation strategy for
these cases.
2013-04-30 04:30:08 -06:00
Nathan Sobo
32178541fe Emit 'destroyed' events from display buffer markers 2013-04-29 21:01:48 -06:00
Nathan Sobo
51e915c423 Replace marker 'observe' methods w/ ordinary 'changed' event 2013-04-29 21:01:48 -06:00
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 v0.7.0 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