Commit Graph

2498 Commits

Author SHA1 Message Date
Garen Torikian
7b65a68450 Update image-edit-session 2013-05-01 17:01:54 -07:00
Garen Torikian
7e6eecc6cf Update gutter 2013-05-01 17:01:54 -07:00
Garen Torikian
9d709ea152 Update git 2013-05-01 17:01:54 -07:00
Garen Torikian
eadb3cf98c Update fold 2013-05-01 17:01:54 -07:00
Garen Torikian
09e9c2f224 Update file 2013-05-01 17:01:53 -07:00
Garen Torikian
dbae05605b Update eventemitter 2013-05-01 17:01:53 -07:00
Garen Torikian
3c5b721177 Update Editor 2013-05-01 17:01:53 -07:00
Garen Torikian
b0e4ce7bb8 Update EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian
2bf7adef5c A slight modification to EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian
34fb03fbd3 Update DisplayBuffer 2013-05-01 17:01:53 -07:00
Garen Torikian
a8a28fea18 Update DisplayBufferMarker 2013-05-01 17:01:53 -07:00
Garen Torikian
16cef29925 Update directory 2013-05-01 17:01:53 -07:00
Garen Torikian
26564ee020 Update cursor 2013-05-01 17:01:53 -07:00
Garen Torikian
66a80ade30 Update config 2013-05-01 17:01:53 -07:00
Garen Torikian
685ec5d8d7 Update buffer-marker docs 2013-05-01 16:58:43 -07:00
Garen Torikian
2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Nathan Sobo
988f4da6e1 Always restore marker ranges on undo/redo, even for valid markers 2013-05-01 17:32:39 -06:00
Nathan Sobo
a9c599abeb Isolate folds on a per-display-buffer basis
Creating a fold in one pane now has no effect on an edit session
for the same buffer in another pane. Before they were polluting each
other by sharing the same fold markers.
2013-05-01 16:24:32 -06:00
Nathan Sobo
c717d23901 🔫 dead code 2013-05-01 16:15:28 -06:00
Nathan Sobo
6153375c76 Base folds on buffer markers, since they don't rely on screen coords
When creating a display buffer for buffers that already have fold
markers, which we'll eventually do on refresh, basing folds on
full-blown display buffer markers is a problem because we end up
creating display buffer markers during construction of the line map.
When we create a display buffer marker it memoizes its screen positions,
but since the line map isn't built yet we have nothing to translate
against. Basically, since the line map depends on folds, folds can't
depend on the line map. Luckily, they don't need to. Buffer markers
work just fine.
2013-05-01 16:14:25 -06:00
probablycorey
0be166bb59 Remove the bottomPaddingInLines from editor 2013-05-01 13:54:37 -07:00
probablycorey
cb2d24baca Listen for clicks outside of the render lines on the underlayer 2013-05-01 13:54:37 -07:00
probablycorey
7609b08e86 💄 2013-05-01 13:54:37 -07:00
Kevin Sawicki
78d8485243 Allow config window to be closed with meta-W
window.confirmClose() should close the window immediately when
there is no rootView which is the case in the config window.
2013-05-01 08:02:17 -07:00
Kevin Sawicki
c3232a463c Use ems instead of pixels for config editor widths
This allows the editor to be big enough to still show
multiple characters in large font sizes.
2013-05-01 07:58:12 -07:00
Kevin Sawicki
536beb0d40 Support setting number fields to 0
Previously entering 0 would end up as '0' in the config
value instead of as a numeric value.
2013-04-30 23:10:22 -07:00
Kevin Sawicki
986e5f9c7a Default to 80 when editor.preferredLineLength <= 0
Previously any non-null value would be used as the target
column in the wrap guide and autoflow packages when really
80 should have been used if the value was non-postive.

Now config.getPositiveInt() is called with a default value
of 80 if the current value isn't already positive.
2013-04-30 22:37:02 -07:00
Kevin Sawicki
f417e898f6 Only call save on active item when it exists
Closes #529
2013-04-30 22:02:46 -07:00
Kevin Sawicki
047d9525e7 Ignore first modified event in config editor
This event comes from initially setting the text for the current
config value on the editor and was causing the config to be
immediately saved multiple times when opened.
2013-04-30 21:55:43 -07:00
Kevin Sawicki
ca7da8a0da Don't set un-parseable numbers to 0 in the config
Previously if an integer or float field was empty it would
default to zero instead of undefined which made it inconsistent
with string value fields.

Now the config value is only set as a Number when it can be
parsed as one.
2013-04-30 21:36:27 -07:00
Nathan Sobo
49b17023a5 Fix method missing exception in LineMap.logLines 2013-04-30 18:40:14 -06:00
Nathan Sobo
693c4f8270 Preserve folds when restoring selections on undo/redo 2013-04-30 18:39:54 -06:00
Nathan Sobo
df08c14aef Restore markers before triggering buffer events
This allows folds to be restored on undo/redo
2013-04-30 18:21:37 -06:00
Nathan Sobo
af903f6690 Don't trigger marker-added/removed events anymore
I missed this previously
2013-04-30 18:20:15 -06:00
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
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
Kevin Sawicki
a788006d7c Default editor.preferredLineLength config to 80 2013-04-30 15:03:46 -07: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
probablycorey
af5392b8ac Add extra padding to the bottom of an editor's vertical scrollbar
This gives us some space when we scroll to the bottom of a file.
Similar to how MacVim works when using the mouse.

Closes #464
2013-04-30 11:52:28 -07:00
Corey Johnson
35b0e06260 💄 2013-04-30 11:52:28 -07: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
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