Commit Graph

2355 Commits

Author SHA1 Message Date
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
1ecd195e6e 💄 2013-04-30 04:53:26 -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
6f34d0b346 Document new methods 2013-04-29 21:01:48 -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
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
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 & 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
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
53dde09523 Mark config panels as internal
The doc spec was failing since these classes were added with
no docs and weren't marked as internal so the coverage dropped
below 80%.
2013-04-27 07:40:06 -07:00
Kevin Sawicki
d2b513bd5e Bind meta-_ to zoom out in image view 2013-04-27 07:19:34 -07:00
Kevin Sawicki
c54766a08a Don't show indent guide in mini editor 2013-04-26 17:31:54 -07:00
probablycorey
8a7aa8083c Add show inded guide 2013-04-26 15:36:58 -07:00
probablycorey
655fec2f18 Redraw editors when panel appears
If not done, the editors have zero height.
2013-04-26 15:36:58 -07:00
probablycorey
2d5bb8bd8b Move open .atom button to config menu 2013-04-26 15:36:58 -07:00
probablycorey
bd7542cb0a Use mini-editors instead of inputs 2013-04-26 15:36:58 -07:00
probablycorey
f06c9a5bc8 Don't respond to observe events when the editor value doesn't change 2013-04-26 15:36:58 -07:00
probablycorey
9f85ba4f7d Empty editors trigger config to delete the associated config key 2013-04-26 15:36:58 -07:00
Corey Johnson & Nathan Sobo
b878be27a0 Revert to default font when setFontFamily is set to null/undefined 2013-04-26 15:36:58 -07:00
probablycorey
e72e1c9c56 Remove log 2013-04-26 15:36:57 -07:00
probablycorey
ecad6bc2a8 Don't allow float or int Editor's to have NaN as a value 2013-04-26 15:36:57 -07:00
probablycorey
cedea831f7 Config panel handles binding for Editors 2013-04-26 15:36:57 -07:00
probablycorey
1b4fbdb065 Allow html attributes to be applied to Editors 2013-04-26 15:36:57 -07:00
Corey Johnson & Nathan Sobo
c5cd39308d Add "open .atom" button to general config view 2013-04-26 15:36:57 -07:00
Nathan Sobo
083e6f26bd Style the general config panel w/ bootstrap 2013-04-26 15:36:57 -07:00