Commit Graph

5802 Commits

Author SHA1 Message Date
Luke Pommersheim
5822eb11f1 function that returns the first matched Cursor at a given screen position Point if it exists in that location 2015-06-11 13:02:14 +02:00
Kevin Sawicki
33accdf1f3 Match directory name to package.json name 2015-06-10 17:06:08 -07:00
Kevin Sawicki
0edce07446 Use folder name when metadata name is empty string or non-string 2015-06-10 16:46:35 -07:00
Max Brunsfeld
48ca93261f Merge pull request #7219 from atom/bf-revert-the-revert-of-pr-7022
Re-introduce atom.directory-searcher service v0.1.0.
2015-06-10 15:51:19 -07:00
Kevin Sawicki
3b6015954b Merge pull request #7176 from atom/mq-package-name-metadata
Only use package directory name as fallback
2015-06-10 15:38:31 -07:00
Michael Bolin
ad46b37cfe In workspace-spec.coffee, updated FakeSearch to match the spec, which
helped uncover a bug.
2015-06-10 23:30:42 +01:00
Michael Bolin
3c44bc06f4 Revert "Revert "Introduce atom.directory-searcher service v0.1.0.""
This reverts commit 262d41c306.
2015-06-10 23:30:25 +01:00
Max Brunsfeld
f2851ac11d Merge pull request #7192 from atom/as-fix-empty-partially-off-screen-markers
Delete partially off-screen markers which are empty
2015-06-09 15:04:52 -07:00
Antonio Scandurra
f73435e053 🐛 Delete partially off-screen markers which are empty
* 🔥 Delete old code which was used to support some non-batched
methods in a previous version;
*  Cover “partially off-screen markers which are
empty” scenario, since that code path was not hit by previous specs

Fixes #7183
2015-06-09 21:35:01 +02:00
Max Brunsfeld
262d41c306 Revert "Introduce atom.directory-searcher service v0.1.0." 2015-06-09 11:51:30 -07:00
Max Brunsfeld
f830623512 Merge pull request #7022 from atom/bf-directory-searcher
Introduce atom.directory-searcher service v0.1.0.
2015-06-09 09:40:06 -07:00
Kevin Sawicki
fb48b38aa7 Guard against no resizing with no siblings
Closes #7091
2015-06-09 09:36:58 -07:00
Michael Bolin
0630bce95c Two things:
* Removed the `Directory` argument to `didSearchPaths`.
Now each searcher gets its own instance of `didSearchPaths` that is parameterized by provider.
* Simplified `DefaultDirectorySearcher.search()` so it creates one `DirectorySearch`
rather than one per `Directory` passed to `search()`.
2015-06-09 15:34:10 +01:00
Michael Bolin
028ac79836 Changed the behavior so that if a searcher rejects,
then the thenable returned by `atom.workspace.scan()` rejects.
2015-06-09 15:34:09 +01:00
Michael Bolin
7dc3d07f8a Changed the contract of DefaultDirectorySearcher in two significant ways:
* `search()` takes an array of `Directory` objects rather than an individual object.
* `options.didSearchPaths` now takes the `Directory` in addition to the `count` as an argument.
2015-06-09 15:34:09 +01:00
Michael Bolin
318498464a Responded to all of @maxbrunsfeld's comments except for:
* The effect of a failed search.
* Letting `DirectorySearcher::search` take multiple directories.

I'm working on those now.
2015-06-09 15:34:09 +01:00
Michael Bolin
5fc9d9e01a Document and test the cancel() method on the object returned by atom.workspace.scan(). 2015-06-09 15:34:09 +01:00
Michael Bolin
10d9111f68 Clean up test to verify that an individual failed search fails the overall search. 2015-06-09 15:34:09 +01:00
Michael Bolin
898f7b87e8 remove require for Disposable that is no longer needed 2015-06-09 15:34:09 +01:00
Michael Bolin
f7e822d41f Make delegate method names more delegate-like. 2015-06-09 15:34:09 +01:00
Michael Bolin
4eb30f3925 Switch to the delegate pattern,
eliminating a nasty race condition and deleting a lot of code.
2015-06-09 15:34:09 +01:00
Michael Bolin
4330c3a181 Fix some nits I found during my self-review. 2015-06-09 15:34:08 +01:00
Michael Bolin
7294e0cda4 Change DirectorySearcher to return a DirectorySearch. 2015-06-09 15:34:08 +01:00
Michael Bolin
7781e34ba2 Introduce atom.directory-searcher service v0.1.0.
The contract for a provider for the `atom.directory-searcher` service
is defined by the spec of the `DefaultDirectorySearcher`.

This modifies `Workspace::scan()` to use the appropriate `DirectorySearcher`
for each member of `atom.project.getDirectories()` when scanning the workspace
for files that match the specified regex.
2015-06-09 15:34:08 +01:00
Machiste Quintana
659ddb67ad Add Package.loadMetadata() specs 2015-06-08 20:57:35 -04:00
Nathan Sobo
5c57cb0cfe Show a warning prompt when opening files over 20MB
We still have some trouble on files this large. I want to show a
progress bar, but for now this is better than freezing without any
warning at all.
2015-06-09 00:02:36 +02:00
Nathan Sobo
36d55c9384 Don’t break out soft tabs that are interrupted by a scope boundary 2015-06-08 22:56:32 +02:00
Antonio Scandurra
cec6959e08 Extend highlights to the full editor width 2015-06-08 18:58:04 +02:00
Jesse Grosjean
05e6d9e55d Stop focusing specs on "Pane" 2015-06-06 22:22:47 -04:00
Jesse Grosjean
f88e21cbb0 Allow items to provide savePanel options. 2015-06-06 22:21:51 -04:00
Antonio Scandurra
515ae7acb7 Use tile node as the reference for highlights width 2015-06-06 17:19:24 +02:00
Antonio Scandurra
c4503fc137 💚 2015-06-06 16:55:00 +02:00
Antonio Scandurra
fcb9653066 Start porting TextEditorComponent specs 2015-06-06 15:41:15 +02:00
Antonio Scandurra
047a405290 Merge branch 'master' into as-opaque-tiles 2015-06-06 11:16:31 +02:00
Antonio Scandurra
b68da1e19b 💚 Finish porting TextEditorPresenter specs 2015-06-06 10:51:35 +02:00
Antonio Scandurra
de766afee7 Start porting specs 2015-06-06 10:18:26 +02:00
Nathan Sobo
6bba381393 Merge pull request #7130 from atom/ns-large-file-mode
Load large files with fewer features but much better performance
2015-06-06 00:05:27 +02:00
Nathan Sobo
3ac9d539ce Add a super basic test for large file mode 2015-06-05 23:40:38 +02:00
Nathan Sobo
df733aa3de Add a basic test for opening an editor in largeFileMode if >= 2MB 2015-06-05 23:25:48 +02:00
Nathan Sobo
ffcebdad33 Remove outdated test 2015-06-05 23:14:11 +02:00
Max Brunsfeld
2337254afb Fix text-editor-component-spec failure
Grouping intervals are exclusive now. It shouldn't affect anybody
since it's a one-millisecond change to the meaning of
grouping-interval, but it required changing some time intervals
in this spec.
2015-06-05 12:05:05 -07:00
Kevin Sawicki
71f9c26418 Only migrate config when not including deprecated APIs 2015-06-05 08:47:00 -07:00
Kevin Sawicki
022d0cead3 Re-enable tree-view and tabs sublime-tabs is installed 2015-06-05 08:43:11 -07:00
Max Brunsfeld
688cc5ef9d Merge pull request #7023 from atom/mb-optimize-marker-observation
Optimize marker observation
2015-06-04 10:57:00 -07:00
Kevin Sawicki
91e3a76d17 Update spec for new deprecation data 2015-06-04 10:53:12 -07:00
Max Brunsfeld
f5895d8b0b presenter: use 'markers-updated' event for state updates
Signed-off-by: Nathan Sobo <nathan@github.com>
2015-06-03 17:58:44 -07:00
Kevin Sawicki
c9eb9d71cc Setup deprecated packages in dev mode 2015-06-03 16:11:16 -07:00
Kevin Sawicki
2523e72e50 🎨 2015-06-03 09:49:03 -07:00
Kevin Sawicki
df2bd62327 Load deprecated packages when including deprecated APIs 2015-06-03 09:47:13 -07:00
Kevin Sawicki
4bb6728784 Add atom.packages.getDeprecatedPackageMetadata 2015-06-03 09:19:57 -07:00
Kevin Sawicki
d557e78847 Add spec for deprecated packages 2015-06-03 09:19:57 -07:00
Max Brunsfeld
76c696f1a2 Merge branch 'master' into mb-optimize-marker-observation
Conflicts:
	src/text-editor-component.coffee
	src/text-editor-presenter.coffee
2015-06-03 09:12:07 -07:00
Nathan Sobo
dac39bdcd5 Merge pull request #6733 from atom/as-tiled-rendering
Render lines via tiles
2015-06-03 00:18:41 +02:00
Kevin Sawicki
82eb01d13e Move deserialize spec to text-editor-spec 2015-06-01 18:01:34 -07:00
Kevin Sawicki
34591d3542 Catch read errors during deserialization
Prevents Atom from failing to open because of a read error with a
serialized editor.
2015-06-01 17:54:43 -07:00
Nathan Sobo
e723b26eb0 Add maximumLength schema enforcer for strings 2015-06-01 18:45:38 +02:00
Nathan Sobo
b68902dd83 🎨 2015-06-01 18:45:38 +02:00
Kevin Sawicki
eaaa6b15e5 🚱 Prevent stdout/stderr data listener leaks
Old listeners were not cleaned up before new ones were being added
causing the following console message:

warning: possible EventEmitter memory leak detected.

Refs #7033
2015-06-01 09:38:10 -07:00
Max Brunsfeld
6f553f234c Add TextEditor::observeMarkers, use it in presenter
Signed-off-by: Nathan Sobo <nathan@github.com>
2015-05-29 17:21:23 -07:00
Max Brunsfeld
b59bec5f9d Add Set::isEqual method in specs
This allows us to use the .toEqual matcher to compare Set
objects.
2015-05-29 17:18:48 -07:00
Max Brunsfeld
686c72eebe Merge pull request #6978 from mostafaeweda/initial-paths-2
Initial paths shouldn't be normalized on save and restore [2]
2015-05-29 10:28:56 -07:00
Antonio Scandurra
9b4d62b687 🐛 Update cursors after model changes
/cc: @nathansobo
2015-05-29 15:21:00 +02:00
Antonio Scandurra
b4dfb2a31b Merge branch 'master' into as-tiled-rendering 2015-05-29 14:19:25 +02:00
Nathan Sobo
447dfd8bec If a keystroke is bound to ‘unset!’, omit it in the application menu
Fixes atom/atom-keymap#79

This is more general than I would like. If the keystroke is unset in
any context, we err on the side of caution and don’t add it to the
application menu for any command. Since our application menu isn’t
context aware, this should be good enough for now and solve the 80%
case. Someday we should make the application menu update / gray out
options when the focused element changes.
2015-05-28 22:59:10 +02:00
Nathan Sobo
31cf19a205 Use previous definition of scope selector match to fix API breakage
I switched to first-mate Selector because I didn’t want to replicate
the poorly-defined Token::matchesScopeSelector method now that tokens
are not stored on lines. However, the first-mate semantics are stricter
and that broke the API. Perhaps using selector-kit here would be better,
but I just wanted to put back exactly to how it was for now.

/cc @ypresto
2015-05-28 10:38:35 +02:00
Mostafa Eweda
4c9e6c5a27 Revert "Merge pull request #6977 from atom/revert-6813-local-initial-paths"
This reverts commit 0c66802278, reversing
changes made to bdce576ab9.
2015-05-27 11:18:15 -07:00
Max Brunsfeld
0dcdfa1e89 Revert "Initial paths shouldn't be normalized on save and restore (could contain uris)" 2015-05-27 10:26:59 -07:00
Max Brunsfeld
8dff5bbe4c Merge pull request #6813 from mostafaeweda/local-initial-paths
Initial paths shouldn't be normalized on save and restore (could contain uris)
2015-05-26 15:48:58 -07:00
Machiste Quintana
8ca1cf2c98 👕 Fix linter errors in text-editor-spec 2015-05-22 19:50:04 -04:00
Machiste Quintana
82958d5aa0 WIP: 👕 Fix even more linter errors 2015-05-22 17:03:06 -04:00
Machiste Quintana
d5bcc0433d WIP: 👕 Fix linter errors 2015-05-22 16:29:12 -04:00
Antonio Scandurra
80a3294f8e 💚 Fix wrong spec
@nathansobo: I just forgot to include an actually visible tile in this
test which, therefore, complained. “Production code”-wise the behavior
was consistent and correct.
2015-05-22 14:05:21 +02:00
Antonio Scandurra
538fcfece3 🎨 Better test naming 2015-05-22 14:01:52 +02:00
Nathan Sobo
1783415714 Fix spec failure
@as-cii this was just a typo, but there’s a failure later in the spec
that you’re probably in a better position to fix quickly.
2015-05-22 09:51:48 +02:00
Nathan Sobo
c02294c404 Merge branch 'master' into as-tiled-rendering 2015-05-22 09:46:00 +02:00
Nathan Sobo
865015e47d Correctly compute bufferDelta for last soft wrap line segment
Fixes #6885
2015-05-21 19:56:53 +02:00
Nathan Sobo
2379b3803f Revert "Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens""
This reverts commit 7cb0bc3bc2.
2015-05-21 19:56:52 +02:00
Nathan Sobo
7cb0bc3bc2 Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens"
This reverts commit 0cd1f110b5, reversing
changes made to d75d202d33.

Conflicts:
	package.json
2015-05-21 16:25:23 +02:00
Antonio Scandurra
490ab2c468 💚
Conflicts:
	spec/text-editor-presenter-spec.coffee
	src/lines-component.coffee
	src/text-editor-presenter.coffee
2015-05-21 11:07:03 +02:00
Antonio Scandurra
299ee5dbf3 Merge branch 'master' into as-tiled-rendering
# Conflicts:
#	spec/text-editor-presenter-spec.coffee
#	src/lines-component.coffee
#	src/text-editor-presenter.coffee
2015-05-21 10:46:52 +02:00
Antonio Scandurra
1a18cda000 💚 Fix remaining specs 2015-05-21 10:00:46 +02:00
Antonio Scandurra
752dbf2c6e Manually config tileSize
Dealing with a manually entered `tileSize` is actually easier to reason about,
therefore we no longer calculate it based on `tileCount.`
2015-05-21 09:59:58 +02:00
Nathan Sobo
0cd1f110b5 Merge pull request #6757 from atom/ns-less-memory-for-tokens
Use 70% less memory for TokenizedLines by using a different representation
2015-05-20 19:47:52 +02:00
Antonio Scandurra
329b5b4e02 Merge branch 'master' into as-tiled-rendering 2015-05-20 17:16:45 +02:00
Mostafa Eweda
e7064bfc9d Fix tests + add integration test 2015-05-19 19:13:19 -07:00
Mostafa Eweda
c3552c95bc Address comments + add tests 2015-05-19 19:05:45 -07:00
Max Brunsfeld
2bfbb7619e Fix bug w/ markers mutated inside of change listeners 2015-05-19 17:48:53 -07:00
Max Brunsfeld
a1cc35b270 Fix DisplayBuffer spec
Marker updates now happen after all buffer changes
2015-05-19 15:18:20 -07:00
Antonio Scandurra
350b306c33 Merge branch 'master' into as-tiled-rendering 2015-05-19 08:51:03 +02:00
Nathan Sobo
adb4988c02 Merge remote-tracking branch 'origin/master' into ns-less-memory-for-tokens 2015-05-19 01:52:10 +02:00
Kevin Sawicki
33ac25479b 🎨 Correct indentation 2015-05-18 15:39:57 -07:00
Kevin Sawicki
00505188fa Add spec for grammar score tie-breaking 2015-05-18 15:30:14 -07:00
Kevin Sawicki
4378255ab6 syntax2 -> grammars2 2015-05-18 15:30:14 -07:00
Kevin Sawicki
84c4ee4c79 atom.syntax -> atom.grammars 2015-05-18 15:30:14 -07:00
Antonio Scandurra
d116a33202 🔥 2015-05-18 11:56:41 +02:00
Antonio Scandurra
b66fdca057 Merge branch 'master' into as-tiled-rendering
Conflicts:
	spec/text-editor-presenter-spec.coffee
2015-05-18 11:49:12 +02:00
Nathan Sobo
3dcf9a4c66 Merge remote-tracking branch 'origin/master' into ns-less-memory-for-tokens 2015-05-16 03:05:11 +02:00
Kevin Sawicki
3a51c44b55 👕 Use skinny arrow for afterEach 2015-05-14 17:03:48 -07:00
Max Brunsfeld
d9e4aa16d2 Run package specs from the active item's project folder 2015-05-14 16:18:54 -07:00
jssln
f6b15ee678 Merge pull request #6776 from jssln/gutterPolish
Refactor `state.gutters` in TextEditorPresenter; pass minimal state to gutter components
2015-05-14 15:43:39 -07:00
Max Brunsfeld
855d327d35 Merge pull request #6760 from atom/mb-text-buffer-6
Upgrade text-buffer for marker performance improvements
2015-05-14 14:29:35 -07:00
Nathan Sobo
870b4739e7 Merge branch 'master' into ns-less-memory-for-tokens 2015-05-14 21:44:31 +02:00
Kevin Sawicki
c53e6b3a17 Merge branch 'master' into jl-all-your-normalizes 2015-05-14 11:21:21 -07:00
Kevin Sawicki
ccaf6220ce Add missing fs-plus require 2015-05-14 10:39:07 -07:00
Kevin Sawicki
b2ee37ab29 Unfocus spec 2015-05-14 10:01:06 -07:00
Nathan Sobo
e694b18ae2 Merge branch 'master' into ns-less-memory-for-tokens
Conflicts:
	spec/tokenized-buffer-spec.coffee
	src/tokenized-buffer.coffee
2015-05-14 18:55:16 +02:00
Kevin Sawicki
c4d7df9e99 Prevent global variables from leaking out of index.js 2015-05-14 09:54:35 -07:00
Jessica Lord
319cff8010 merge 2015-05-14 09:48:03 -07:00
Nathan Sobo
ac5a5d5ba0 Remove unused TokenizedBuffer methods that relied on tokens shim 2015-05-14 17:51:46 +02:00
Antonio Scandurra
e7ddb3d8ad 💚 Fix all TextEditorPresenter specs 2015-05-14 15:54:53 +02:00
Antonio Scandurra
5b23a002cf 💚 Fix position specs 2015-05-14 15:54:45 +02:00
Antonio Scandurra
c39b1d2159 Merge branch 'master' into as-tiled-rendering 2015-05-14 10:45:32 +02:00
Max Brunsfeld
19d905606b Avoid double computation of screen lines when opening files
Previously, instantiating a TextEditor would always compute compute
screen lines twice: once when the DisplayBuffer was instantiated,
and once when the 'invisibles' property was set on the DisplayBuffer.
2015-05-13 19:59:25 -07:00
Jess Lin
57d0887346 [Gutter] Move line number gutter tests to be under .gutters in TextEditorPresenter specs 2015-05-13 16:47:42 -07:00
Jess Lin
e34dfc636c [Gutter] Fix custom decorations tests in TextEditorPresenter specs 2015-05-13 16:47:42 -07:00
Jess Lin
cd806ee764 [Gutter] Fix former .sortedDescription tests in TextEditorPresenter specs 2015-05-13 16:47:42 -07:00
Jess Lin
b6055f3a67 [Gutter] Fix shared gutter styles tests in TextEditorPresenter specs 2015-05-13 16:47:42 -07:00
Jess Lin
fdb696f4dc [Gutter] Fix line-number gutter tests in TextEditorPresenter specs 2015-05-13 16:47:42 -07:00
Nathan Sobo
173bc82e42 Don’t include tokens in presenter state for lines 2015-05-14 01:46:32 +02:00
Nathan Sobo
00b30f7db8 Remove some dead code 2015-05-13 22:03:26 +02:00
Nathan Sobo
bf6754981b decodeContent -> decodeTokens 2015-05-13 21:17:46 +02:00
Nathan Sobo
2765753791 Don’t assume same token instances in spec now that we use shims 2015-05-13 21:17:46 +02:00
Nathan Sobo
b8895cdaaf Update spec based on new interface for Grammar::tokenizeLine 2015-05-13 21:17:45 +02:00
Nathan Sobo
a8d01bcec1 Fix bufferRangeForScopeAtPosition with new tags array scheme 2015-05-13 21:17:45 +02:00
Nathan Sobo
6eb61d977d Delete spec that’s no longer relevant 2015-05-13 21:17:45 +02:00
Jess Lin
a84c79c650 [Gutter] Fix GutterContainerComponent spec 2015-05-13 12:04:47 -07:00
Jess Lin
27319c4300 [Gutter] Fix CustomGutterComponent spec 2015-05-13 11:48:25 -07:00
Ben Ogle
a937dc2fd4 Dont remove symlinked autocomplete-plus packages 2015-05-13 11:30:35 -07:00
Ben Ogle
ef224e39db Remove catch 2015-05-13 09:19:03 -07:00
Ben Ogle
b0c9a93420 Fix another lint error 2015-05-13 09:19:03 -07:00
Ben Ogle
e7d921bfbc Add specs for autocomplete deletion 2015-05-13 09:19:03 -07:00
Antonio Scandurra
25acaf26c1 🎨 tileId -> tileRow 2015-05-13 12:44:06 +02:00
Antonio Scandurra
49c48234f2 💚 Finish fixing tiles/lines specs 2015-05-13 12:27:51 +02:00
Antonio Scandurra
29c6e9d89c 💚 Start fixing presenter specs 2015-05-13 12:27:18 +02:00
Antonio Scandurra
11a0fa7a12 updateTileSize on start 2015-05-13 12:27:18 +02:00
Antonio Scandurra
cde632c8b5 Merge branch 'master' into as-tiled-rendering 2015-05-13 10:34:51 +02:00
Max Brunsfeld
34a3ee1be9 ⬆️ text-buffer 2015-05-12 18:02:27 -07:00
Jessica Lord
b8c0c661ea Correct package name, remove log 2015-05-12 16:57:50 -07:00
Jessica Lord
8a89054545 Fixture name to match fixture dir 2015-05-12 15:16:15 -07:00
Jessica Lord
d03153fab5 No spaces in package.json name 2015-05-12 12:58:50 -07:00
Jessica Lord
9dbdeac93c Merge branch 'master' into jl-all-your-normalizes 2015-05-11 17:21:29 -07:00
Jessica Lord
3e73eadb6c Correct semver by adding 3rd digit 2015-05-11 16:08:44 -07:00
Antonio Scandurra
9581202a77 Merge branch 'master' into as-tiled-rendering 2015-05-11 09:18:13 +02:00
Kevin Sawicki
2c23d6f3ab 🎨 2015-05-08 13:33:30 -07:00
Kevin Sawicki
02d1e0be56 Uncomment env conditionals 2015-05-08 13:25:54 -07:00
Kevin Sawicki
75ac785e77 Add spec for opening to line and column 2015-05-08 13:24:48 -07:00
Kevin Sawicki
1e567b62e2 Add spec for opening file to line number 2015-05-08 13:23:28 -07:00
Kevin Sawicki
9a85164090 Add spec for file path with trailing colon/whitespace 2015-05-08 13:04:42 -07:00
Jessica Lord
c9046a6cfa Add error message to Jasmine output 2015-05-08 11:16:19 -07:00
Kevin Sawicki
523171061b Stop resize if detached or if siblings are missing
Closes #6630
2015-05-07 16:26:18 -07:00
Kevin Sawicki
b7dddeebfe Guard against no hosted git info
Closes #6693
2015-05-07 13:24:03 -07:00
Max Brunsfeld
75289ee3dd Fix some integration test flakiness 2015-05-06 10:32:56 -07:00
Antonio Scandurra
daa4b33e64 wip 2015-05-06 09:03:23 +02:00
Antonio Scandurra
3d3d5d00b4 wip 2015-05-05 14:24:58 +02:00
Jessica Lord
1d69d83410 Merge pull request #6582 from atom/jl-short-url-redo
Normalize short urls for repositories in package.json
2015-04-30 15:00:05 -07:00
Max Brunsfeld
570c424eae Merge pull request #6563 from atom/ns-fix-scroll-width-with-folds
Fix scroll width calculation when longest line is folded
2015-04-30 14:26:34 -07:00
Jessica Lord
c228c3fcf7 Add spec and feature to test normalizing repository short urls 2015-04-30 11:23:11 -07:00
Kevin Sawicki
c347b41c55 Merge pull request #6539 from atom/mq-reset-font
Reset font size to window's starting font size
2015-04-30 10:50:43 -07:00
Machiste Quintana
4fb58317ec 🔥 Redundant lines 2015-04-30 13:41:47 -04:00
Lee Dohm
be2e340412 Remove focus 2015-04-29 18:16:49 -07:00
Lee Dohm
eda1b743d7 Fix spec to expect whitespace to be removed 2015-04-29 18:14:16 -07:00
Lee Dohm
22c915a8fd Fix most of the specs 2015-04-29 17:52:38 -07:00
CaptSaltyJack
adb017851b Fixed glaring mistake in test spec 2015-04-29 17:09:32 -07:00
CaptSaltyJack
a8283c3c9b Added delete-to-next/previous-word-boundary
This is better behavior for alt-del/backspace operations, is less
"greedy" and doesn't eat up excess characters.
Also set default key mappings to these, feel free to trash my changes
to keymaps/darwin.cson. Though I do feel this should be default
behavior, personally.
2015-04-29 16:31:07 -07:00
Ben Ogle
68a6af4873 Merge pull request #6572 from atom/bo-measure-gutter
Measure gutter width rather than calculating the width
2015-04-29 16:13:03 -07:00
Ben Ogle
d3ef6c91af Measure gutterWidth, and pass to presenter 2015-04-29 15:47:44 -07:00
Kevin Sawicki
a13c49d679 Merge pull request #6570 from jssln/gutter
[Gutter] Clear custom gutter decorations from previous usages of a custo...
2015-04-29 14:26:28 -07:00
Kevin Sawicki
da0c087675 Add BufferedProcess spec for invoking callbacks 2015-04-29 09:43:41 -07:00
Kevin Sawicki
920def7eb0 Add spec for thrown spawn error 2015-04-29 09:20:21 -07:00
Jess Lin
5e766b6eee [Gutter] Clear custom gutter decorations from previous usages of a custom gutter element 2015-04-29 08:53:04 -07:00
Nathan Sobo
1d238dd927 Fix scroll width calculation when longest line is folded
With the presenter we started clipping screen positions prior to
translating them to pixel positions. This interacts with the current
clipping behavior on folded lines (which should change) where the cursor
is always clipped to 0. So when the longest line was also folded we
were miscalculating the width. 🙈!

The removal of clipping also causes us to calculate the width based on
the trailing whitespace of soft-wrapped lines, which I actually think
is an improvement but it is slightly different.
2015-04-28 23:30:13 -06:00
Machiste Quintana
2bd7cc9a99 Reset font size if editor.fontSize is changed from anywhere 2015-04-28 22:58:35 -04:00
Nathan Sobo
192997c8cf Clear line numbers from previous usages of the gutter element
In adding custom gutter APIs, I suggested to @jssln that we associate
the gutter model objects with DOM nodes in the view registry to make
it easy for package authors to get at the view layer for a particular
gutter. She also applied this treatment to the line numbers gutter,
which makes sense.

However, using the view registry opened up an unexpected wrinkle…

When you detach an editor, we need to tear down all the associated view
logic because at that point, we don’t know whether the element is about
to be reattached or whether it’s going to get garbage collected. In the
case where we reattach, we end up constructing a new TextEditorComponent
for the element. When this happens, the gutter component requests a DOM
node for the gutter from the view registry. Except in this case the
DOM element isn’t empty because it was already used by a different
component for the same element before it was detached. The fix is simply
to always clear out the line numbers to ensure we start in a clean
state.

@jssln: You should apply this same fix to custom gutters or we’ll see
the same issues.
2015-04-28 20:05:25 -06:00
Machiste Quintana
12b59cf610 Only reset font size if font size has been changed 2015-04-28 06:27:03 -04:00
Machiste Quintana
f4b228c908 Reset font size to window's starting font size 2015-04-28 06:27:03 -04:00
Kevin Sawicki
3bd0093eb3 Update scrollbar style spec for new library API 2015-04-23 16:10:06 -07:00
Nathan Sobo
ec3f37dee3 Avoid deprecation warnings in spec 2015-04-22 13:12:09 -06:00
Jess Lin
3949153390 [Gutter] Presenter should return gutter decorations for screen row range, not buffer row range 2015-04-22 07:29:00 -07:00
Jess Lin
cdca9c3ef1 [Gutter] Fix coffeescript style issues 2015-04-22 07:29:00 -07:00
Jess Lin
55c6a11c36 [Gutter] Add comment to explain avoided decoration update in presenter & remove test 2015-04-22 07:29:00 -07:00
Jess Lin
166f040077 [Gutter] Address rename nit in CustomGutterComponent-spec 2015-04-22 07:28:59 -07:00
Jess Lin
85188ced03 [Gutter] Move 'lineNumberGutter' state to nest under 'gutters' in the presenter state 2015-04-22 07:28:59 -07:00
Jess Lin
79b460a0ca [Gutter] Add ::getDomNode method to all 'components' 2015-04-22 07:28:59 -07:00
Jess Lin
28ff5dd3c3 [Gutter] Tests for CustomGutterComponent 2015-04-22 07:28:59 -07:00
Jess Lin
f418376013 [Gutter] Tests for GutterContainerComponent 2015-04-22 07:28:59 -07:00
Jess Lin
8c4d092767 [Gutter] TextEditorPresenter tests for custom gutter decorations 2015-04-22 07:28:59 -07:00
Jess Lin
14e5d38354 [Gutter] TextEditorPresenter: Consolidate common gutter state under @state.gutters 2015-04-22 07:28:58 -07:00
Jess Lin
34856d94f5 [Gutter][DOM Persistence] Keep a gutter in the DOM if it is merely hidden (not destroyed) 2015-04-22 07:28:58 -07:00
Jess Lin
f3d2597bda [Gutter][View Registry] Make the Presenter pass sorted Gutter models instead of sorted derived state 2015-04-22 07:28:58 -07:00
Jess Lin
d734ffe545 [Gutter] Make TextEditorPresenter recognize Decorations for custom gutters 2015-04-22 07:28:58 -07:00
Jess Lin
8d6745d8a9 [Gutter] Replace GutterComponent with GutterContainerComponent in TextEditorComponent 2015-04-22 07:28:57 -07:00
Jess Lin
7582e98f4c [Gutter] TextEditorPresenter: rename @state.gutter -> @state.lineNumberGutter 2015-04-22 07:28:57 -07:00
Jess Lin
ee7625249f [Gutter] Create event subscription methods for gutter changes 2015-04-22 07:28:57 -07:00
Jess Lin
b361e1719c [Gutter] Add decorateMarker method to Gutter model 2015-04-22 07:28:57 -07:00
Jess Lin
58d6712b0e [Gutter] Augment Decoration to discern the line-number gutter from custom gutters 2015-04-22 07:28:57 -07:00
Jess Lin
eb321a64c1 [Gutter] Create a line-numbers Gutter on each TextEditor 2015-04-22 07:28:56 -07:00
Jess Lin
20d3c07bf5 [Gutter] Add add/get Gutter methods to TextEditor 2015-04-22 07:28:56 -07:00
Jess Lin
fccc9ebee4 [Gutter] Rename current references to 'Gutter' -> 'LineNumberGutter' 2015-04-22 07:28:56 -07:00
Jess Lin
a6efa104db [Gutter] Don't allow the 'line-number' gutter to be destroyed 2015-04-22 07:28:56 -07:00
Jess Lin
94a0bf3f90 [Gutter] Create Gutter and GutterContainer w/ API to hide/show 2015-04-22 07:28:56 -07:00