Commit Graph

67 Commits

Author SHA1 Message Date
Nathan Sobo
002918049d 🐎 Cache gutterVisible state in React component
This avoids a config read on every render.
2015-01-12 16:21:31 -07:00
Nathan Sobo
f00b0b7f7a Add TextEditor::set/isGutterVisible
Controls gutter visibility on individual editors.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-12 16:21:31 -07:00
Lee Dohm
ef97197681 Use list.map instead of _.map list 2015-01-09 16:42:16 -08:00
Lee Dohm
acb19c1fe1 Log scopes to notification instead of console
Fixes #4969
2015-01-09 16:33:48 -08:00
Nathan Sobo
7f9d06f55b Move TextEditor::pixelPositionForScreen/BufferPosition to view layer
It doesn’t make sense to talk about pixels at the model layer long-term,
even though we currently store view dimension information in the model
so we don’t have to read from the DOM for optimization purposes. This
information is only available if the view is attached, however, making
these methods a liability on the model layer.
2015-01-09 08:22:45 -08:00
Max Brunsfeld
825c4f6098 Remove incorrect docs for ::toggleLineCommentsForBufferRows 2014-12-30 12:36:46 -08:00
Max Brunsfeld
a1b4820c04 Revert "Revert "Merge pull request #4631""
This reverts commit dc2a453986.

Conflicts:
	spec/config-spec.coffee
	src/config.coffee
2014-12-23 09:26:40 -08:00
Kangaroopower
04ceaf36bf Actually return the new grammar, as per the API
Previously, the emitter didn't return the new type of grammar, just an undefined to signal when the grammar changed. This patch makes it so that the type of grammar is returned when the texteditor's grammar changes, as per what the API says it does
2014-12-22 21:46:16 -08:00
Max Brunsfeld
dc2a453986 Revert "Merge pull request #4631 from atom/mb-new-config-api"
This reverts commit 5147fb6a8b, reversing
changes made to 9bbbb58084.
2014-12-16 15:27:39 -08:00
Max Brunsfeld
2cea51b50e Take 'scope' option in Config::onDidChange
Deprecate passing the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Nathan Sobo
c58606907a Make scope a trailing option to Config::get 2014-12-16 14:00:56 -08:00
Nathan Sobo
7422f4378e Add property filters to TextEditor::getDecorations methods
This makes it much easier to write tests that inspect the state of
decorations.
2014-12-10 19:11:50 -07:00
Nathan Sobo
dd63d47c11 Add getters for decoration types in addition to ‘overlay’ 2014-12-02 15:59:12 -07:00
Nathan Sobo
e2813b4dd9 📝 overlay decoration options in TextEditor::decorateMarker 2014-11-26 15:14:56 -07:00
Nathan Sobo
1d6087fcd3 Add TextEditor::getDecorations and ::getOverlayDecorations
Required for autocomplete upgrades.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-26 12:17:26 -07:00
Nathan Sobo
d75c35285c Publicize checkpoint methods and deprecate open-ended transactions
On TextEditor

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-24 14:23:48 -07:00
Max Brunsfeld
bf83fb7b10 ⬆️ text-buffer@3.7.0 for checkpoints
Also add methods on TextEditor to expose the new checkpoint
functionality
2014-11-21 11:06:43 -08:00
Max Brunsfeld
0ca9d7b97e Remove the normalizeIndentOnPaste setting. Always do it. 2014-11-19 09:13:30 -08:00
Max Brunsfeld
270642b2ea Add special paste behavior when copying/cutting w/ no selection 2014-11-18 18:58:25 -08:00
Ben Ogle
2a56e70110 Fix logCursorScopes
Close #4204
2014-11-18 11:00:11 -08:00
Max Brunsfeld
e34eb151ca Respect 'normalizeIndentOnPaste even w/ multiple selections 2014-11-17 19:24:37 -08:00
Max Brunsfeld
175a8b6968 Provide separate config option for auto-indent on paste
This way, this option (`autoIndentOnPaste`) can be turned off for
indentation-sensitive languages like coffeescript.
2014-11-17 10:30:13 -08:00
Max Brunsfeld
c8ad232c31 Respect the editor.autoIndent option when pasting
Signed-off-by: Nathan Sobo <nathan@github.com>
2014-11-17 08:52:51 -08:00
Max Brunsfeld
fa96adc2ce Clean up TextEditor::pasteText 2014-11-14 09:33:48 -08:00
Nathan Sobo
9f194ff4df Create an empty TextBuffer if needed in TextEditor constructor 2014-11-13 16:04:57 -08:00
Max Brunsfeld
3521b96611 Don't select the copied line when copying with no selection 2014-11-12 10:12:26 -08:00
Kevin Sawicki
7abfd45baf Default to using hard tabs in Makefile files
This is a temporary solution until scoped settings supports this
type of restriction.

Closes atom/language-make#3
2014-11-12 09:31:12 -08:00
Max Brunsfeld
7a87c22c7d Cut/copy whole lines when no text is selected
Closes #3643
2014-11-11 10:02:17 -08:00
Nathan Sobo
ab395952a9 Dispose of ::scopedConfigSubscriptions when Editor is destroyed 2014-11-07 10:13:38 -07:00
Max Brunsfeld
4077e791c9 Update signature of calls to TextBuffer::transact 2014-11-05 15:58:13 -08:00
Max Brunsfeld
e7eef89fa5 Remove TextEditor::withGroupingInterval
Just use ::transact
2014-11-05 15:58:13 -08:00
Max Brunsfeld
b7aa421e4e Add TextEditor::withGroupingInterval
This method temporarily instructs the editor to apply undo grouping with
a given interval. This way, undo grouping can be made optional without
adding optional arguments to every buffer manipulation method.
2014-11-05 15:58:12 -08:00
Ben Ogle
5231a548e3 Pass options through to the text buffer 2014-10-30 17:49:43 -07:00
Kevin Sawicki
5985175b07 📝 Fix typo 2014-10-29 11:33:01 -07:00
Kevin Sawicki
d2ef888f22 Add TextEditor::onDidChangeEncoding 2014-10-29 11:33:01 -07:00
Kevin Sawicki
35925ed349 Add encoding getter and setter 2014-10-29 11:33:01 -07:00
Kevin Sawicki
25eea7d19b Remove TextEditor::setEncoding 2014-10-29 11:33:01 -07:00
Kevin Sawicki
4c9e71770a Add initial TextEditor::setEncoding 2014-10-29 11:33:00 -07:00
Bruno Duyé
55ace0fe99 📝 fix TextEditor::delete() doc 2014-10-25 19:35:19 +02:00
Ben Ogle
498c8d21b2 Fix comments n junk 2014-10-21 13:27:01 -07:00
Ben Ogle
37159bb478 Oops, don’t call the method twice 2014-10-21 11:44:58 -07:00
Ben Ogle
16ad957609 scopeDescriptor -> scopes
Now that we have a real ScopeDescriptor object, 
these should change back!
2014-10-21 11:38:43 -07:00
Ben Ogle
137eeab4cf Return scopes arrays from deprecated methods
backward compatibility
2014-10-21 11:19:58 -07:00
Ben Ogle
ce2959c0b9 Return ScopeDescriptor objects 2014-10-20 17:49:02 -07:00
Ben Ogle
b2cc190a3b Actually get the cursor 2014-10-13 16:35:50 -07:00
Ben Ogle
c0091b4601 scopes -> scopeDescriptor
!!!
2014-10-13 16:30:41 -07:00
Ben Ogle
80f52aa3ef Reorganize scopes section 2014-10-13 16:17:01 -07:00
Ben Ogle
56c6c3516a scopesForBufferPosition -> scopeDescriptorForBufferPosition 2014-10-13 16:16:44 -07:00
Ben Ogle
f7ab04404c Remove scopesAtCursor from TextEditor class 2014-10-13 16:15:58 -07:00
Ben Ogle
a28fed8bae 📝 Expose TextEditor::observeGrammar 2014-10-08 16:01:42 -07:00