Commit Graph

336 Commits

Author SHA1 Message Date
Nathan Sobo
76d84a7890 Handle multiple selections intersecting a line in duplicateLines 2017-01-12 13:38:19 -07:00
Max Brunsfeld
126f5380ba Emit editor destroyed event after releasing the editor's buffer 2017-01-03 15:18:01 -08:00
Max Brunsfeld
6f13159549 Don't throw exceptions when using editor APIs after destroying the editor
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-01-03 14:00:50 -08:00
Max Brunsfeld
f4371efb74 Fix usages of destroyed buffers in specs 2017-01-02 11:32:02 -08:00
Nathan Sobo
8b181063ca Adjust spec now that tab length does not affect leading space tokens 2016-12-13 00:09:09 -07:00
Max Brunsfeld
65edebda73 Update test to reflect new soft wrap indent clipping behavior
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-12-12 17:05:18 -08:00
bene
0411509b43 Fix toggleLineCommentsInSelection for empty lines 2016-10-29 14:04:30 +02:00
Ian Olsen
f726dcc81b Merge pull request #12922 from stereobooster/10474-prompt-to-save-unsaved-buffer
Fix for #10474
2016-10-26 16:35:43 -07:00
Antonio Scandurra
4df74beba7 Merge branch 'master' into as-deprecate-shadow-dom 2016-10-17 12:06:00 +02:00
stereobooster
63b9c8eb4b Add test coverage for save before close 2016-10-11 01:19:55 +03:00
Antonio Scandurra
3d2e18747f Prefer using new TextEditor to Workspace.prototype.buildTextEditor 2016-10-10 09:28:36 +02:00
Antonio Scandurra
18ddcf902b Statically assign a clipboard instance to the TextEditor class 2016-10-07 18:21:09 +02:00
Antonio Scandurra
901b0b17a3 Fix failing tests 2016-10-07 13:41:00 +02:00
Max Brunsfeld
d79690e2d5 Merge pull request #12823 from atom/mb-as-guard-tab-length
Guard against null tab length value
2016-09-29 14:21:54 -07:00
Max Brunsfeld
556d79b544 Guard against null tab length value
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-09-29 12:01:39 -07:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Antonio Scandurra
de6b836da4 Add test coverage for copying auto{Width,Height} 2016-08-19 14:10:59 +02:00
Antonio Scandurra
1f4cd6e00d Merge branch 'master' into ns-fix-editor-auto-height
# Conflicts:
#	src/text-editor.coffee
2016-08-19 13:27:26 +02:00
Max Brunsfeld
26c9e5ee78 Set editor's tokenized buffer's tab length on its display layer when deserializing 2016-08-18 17:06:26 -07:00
Nathan Sobo
dd82902bf2 Disable autoHeight on text editor pane items 2016-08-18 14:03:44 -06:00
Max Brunsfeld
90b699f5cc Remove some text editor ivars that are redundant w/ display layer properties 2016-08-18 10:41:11 -07:00
Nathan Sobo
13c00995d4 Return default value of true from TextEditor.getAutoHeight
When we need to check for unassigned in the deprecated code path, we
can just read the instance variable directly to avoid getting the
deafult.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-17 15:52:51 -06:00
Nathan Sobo
106621e161 Deprecate automatic assignment of autoHeight for text editors
Previously, we attempted to automatically determine whether the editor’s
height should be based on the editor’s content or the height of its
container. Unfortunately, DOM APIs are insufficient to make this
determination in a complete way, leading to unpredictable behavior.

This PR deprecates the automatic determination of this behavior. By
default, editors base their height on their content. If an editor has
an explicit height assigned via its style or is positioned absolute with
an explicit top and bottom, we disable the content-based autoHeight and
log a deprecation warning telling the user to assign autoHeight
explicitly.

This paves the way to add an autoWidth setting, which will default to
false.
2016-08-17 15:52:51 -06:00
Antonio Scandurra
683bf37907 Add autoWidth to TextEditor 2016-08-17 16:14:36 +02:00
Max Brunsfeld
4b0183d074 Remove extraneous TextEditor setter methods 2016-08-15 16:45:10 -07:00
Max Brunsfeld
0d099d2fd5 Serialize all TextEditor parameters needed for the DisplayLayer 2016-08-15 15:51:22 -07:00
Max Brunsfeld
a11a235ef1 Don't reset display layer twice in TextEditor constructor 2016-08-12 13:36:50 -07:00
Max Brunsfeld
0a1834079f Rename getSoftWrapIndentLength -> getSoftWrapHangingIndentLength 2016-08-11 16:38:34 -07:00
Max Brunsfeld
684952458f Remove new TextEditor setters; just use update 2016-08-11 15:34:54 -07:00
Max Brunsfeld
11463ef00b Merge remote-tracking branch 'origin/as-introduce-editor-update' into ns-mb-detangle-editor 2016-08-11 11:36:48 -07:00
Max Brunsfeld
6346d05505 Remove last use of atom.config in text editor spec 2016-08-09 10:20:49 -07:00
Max Brunsfeld
eb9d89f8c8 Observe grammar changes on editors in maintainConfig 2016-08-08 12:10:56 -07:00
Max Brunsfeld
ee2e18737e Fix maintenance of grammars for copied editors 2016-08-08 11:17:30 -07:00
Max Brunsfeld
ddfb124cb8 Merge branch 'master' into ns-mb-detangle-editor 2016-08-05 09:39:43 -07:00
Max Brunsfeld
74f8890592 ⬆️ text-buffer for marker layer destruction fixes 2016-08-04 12:37:51 -07:00
Max Brunsfeld
43f34f73da Supply missing softWrapHangingIndent parameter to display layer 2016-08-02 16:20:23 -07:00
Max Brunsfeld
3d796df401 Stop using GrammarRegistry in TextEditor 2016-07-27 14:09:17 -07:00
Max Brunsfeld
a44d5833a8 Move grammar override logic into TextEditorRegistry
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:00:20 -07:00
Max Brunsfeld
455d3213ed Return token objects from tokensForScreenRow
Include the text of each token alongside its array of scopes.

Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 12:39:41 -07:00
Max Brunsfeld
4eb2f6631a 👕 Fix lint errors 2016-07-15 13:32:23 -07:00
Max Brunsfeld
b1f5583c4e Remove stray usages of atom.config in text-editor-spec 2016-07-12 11:31:03 -07:00
Max Brunsfeld
58ec44f8ec Move handling of nonWordCharacters setting into TextEditorRegistry 2016-07-12 11:30:41 -07:00
Max Brunsfeld
7a50aa9f9f Move handling of auto indent settings to TextEditorRegistry 2016-07-11 17:37:51 -07:00
Max Brunsfeld
cdc9bdea61 Use setter methods instead of config settings in TextEditor test 2016-07-11 17:03:44 -07:00
Max Brunsfeld
25035d8fce Remove some config usages from text editor spec 2016-07-11 13:52:05 -07:00
Antonio Scandurra
811ab26f61 Return an update promise in TextEditor.prototype.update() 2016-07-08 09:42:08 +02:00
Antonio Scandurra
b46ae1e681 Allow autoHeight to be updated in TextEditor.prototype.update 2016-06-30 15:30:05 +02:00
Antonio Scandurra
8cb0fbcc5c Allow autoHeight to be set from the editor 2016-06-30 15:27:47 +02:00
Antonio Scandurra
7325381fd6 🎨 2016-06-30 15:08:51 +02:00
Antonio Scandurra
ccf73189ee Allow scrollPastEnd to be updated in TextEditor.prototype.update 2016-06-30 15:07:20 +02:00