Commit Graph

80 Commits

Author SHA1 Message Date
Kevin Sawicki
fd1d872840 Prompt split editors to save on close
Previously an editor that was split into multiple panes would not
prompt to save correctly when the window was unloading.

This adds a new `windowCloseRequested` option passed through from the
beforeunload handler to the editor so that it can specially handle this
case.

Closes #5257
2015-02-04 17:14:46 -08:00
Kevin Sawicki
1fc597ca22 🎨 2015-01-21 11:23:28 -08:00
Kevin Sawicki
c378ef0649 Merge pull request #5044 from russlescai/rl-scoped-file-encoding
Allow scoped default File Encoding
2015-01-21 11:22:17 -08:00
Nathan Sobo
c69f4baa04 Merge pull request #5068 from atom/ns-line-number-decorations
Rename 'gutter' decorations to 'line-number'
2015-01-14 20:04:02 -07:00
Nathan Sobo
5a4cf01083 Move getFirst/LastVisibleScreenRow to the view 2015-01-14 20:02:49 -07:00
Nathan Sobo
542ed631e8 Emit deprecation warnings for decorations of type ‘gutter’ 2015-01-14 19:49:46 -07:00
Nathan Sobo
8c574bfd30 Rename 'gutter' decorations to 'line-number' decorations 2015-01-14 19:49:46 -07:00
Russell Lescai
c538857cfa Removed unnecessary braces. 2015-01-15 08:57:25 +10:30
Russell Lescai
3d1baaf3f3 Added spec. Changed argument order for config get/set. 2015-01-14 13:46:21 +10:30
Russell Lescai
b819f681aa Moved setEncoding to TextEditor constructor. 2015-01-14 13:05:20 +10:30
Tony Han
4ebf748fd7 📝 fix ::observeCursors doc
Change selection -> cursor
2015-01-14 01:53:25 +08:00
Nathan Sobo
7f8ab72f53 Capitalize initialisms
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-12 22:00:24 -08:00
Nathan Sobo
43f57347d7 Add ‘gutter-hidden’ attribute to TextEditorElement
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-12 16:21:31 -07:00
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