Commit Graph

2888 Commits

Author SHA1 Message Date
Kevin Sawicki
e675fe73c8 Set soft wrap explicitly on the display buffer
This is required now that soft wrap column only takes affect
when soft wrap is enabled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
5001c6e84e Enable soft wrap explicitly in specs
This is required now that the soft wrap setting and soft wrap
column are decoupled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
a4411ab2ca Update specs for resize handler changes 2013-08-23 18:09:16 -07:00
Kevin Sawicki
5ea8c6c27b Don't store soft wrap column on EditSession
This removes duplicate state between the edit session and
display buffer.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
da1e5f5c10 Always update the soft wrap column when the window resizes
This allows the edit session and display buffer to always be
notified of soft wrap column changes regardless of their initial
soft wrap state.
2013-08-23 18:09:16 -07:00
probablycorey
78b9a99f86 Add window:run-package-specs command
This will only run specs found in the current projects spec directory
2013-08-23 09:02:22 -07:00
Kevin Sawicki
f32a289193 Store relative buffer path instead of id
This allows the tokenized buffer to be deserialized during reopening
from the pane container.

Closes #744
2013-08-22 14:42:08 -07:00
Kevin Sawicki
92a80208d3 Update the relative path when the buffer's file moves 2013-08-22 13:59:46 -07:00
Kevin Sawicki
a0db412140 Use editor.softTabs config value when creating edit sessions
This replaces the internal softWrap state and removes the previous
getter and setter for this value that was on Project.
2013-08-21 18:12:26 -07:00
Kevin Sawicki
147e75ad95 Use editor.softWrap config value when creating edit sessions
Closes #666
2013-08-21 17:17:06 -07:00
Kevin Sawicki
2f4db45320 Use editor.tabLength config value when creating edit sessions
Closes #708
2013-08-21 17:12:04 -07:00
Nathan Sobo
0192c57f46 Fix corner case in RowMap::mapBufferRowRange w/ 0-buffer-row regions
Fixes #688

The DisplayBuffer applies buffer and screen deltas to the row map as
rows are inserted/removed from the buffer/screen. This can leave some
of the regions in a weird state, such as mapping multiple screen rows
to zero buffer rows. But next the DisplayBuffer applies any new mappings
based on the replaced lines over the top of existing regions. These
weirdly shaped regions should be overwritten by newly inserted regions,
so at the end of the operation the row map makes sense again.

This fixes a corner case where regions spanning 0 buffer rows at the
very beginning of the row range were not being included in the set of
regions to replace. This was in turn causing the RowMap to get into a
bad state in certain situations involving soft-wrapped lines.
2013-08-20 19:30:29 -06:00
Kevin Sawicki
6e2fd18f62 Add back ability to open an arbitrary window
atom.open now takes an options has that can contain either pathsToOpen
or the complete settings of a new window.

This will be used by the collaboration package to open the window when a
session is being joined.
2013-08-20 15:30:53 -07:00
Corey Johnson & Nathan Sobo
0c9a1fdc80 Rename Keymap::toObject to Keymap::keystrokesByCommand
Also add spec for passing a selector
2013-08-20 12:23:15 -07:00
probablycorey
068e656627 Remove unused atom.getVersion method 2013-08-20 12:23:13 -07:00
probablycorey
37c17075ea Add keymap.toObject() 2013-08-20 12:23:12 -07:00
probablycorey
efb70e0562 Remove specs and methods that are no longer used 2013-08-20 12:23:12 -07:00
Kevin Sawicki
27cee3e19c Don't terminate tokenization if stack size changes
Previously Python import blocks were not tokenizing correctly since
the loop was prematurely terminating when a match at the end of the line
was reached and no tokens were generated for it.

This approach was incorrect since the tokenizer may have just popped a rule
and another loop could possibly pop more rules.

Now this early termination is only performed if the stack size hasn't changed.
2013-08-20 11:38:06 -07:00
Kevin Sawicki
77ed5324b1 Move specs from spec/app to spec/ 2013-08-19 21:23:00 -07:00
Kevin Sawicki
a7a1244599 Flatten spec directory 2013-08-19 20:13:58 -07:00
Kevin Sawicki
b6785d78e8 Reset themes in afterEach
This ensures they don't bleed over into other specs.
2013-08-19 19:49:52 -07:00
Ben Ogle
15085384b9 change name of event to reloaded 2013-08-19 15:55:16 -07:00
Ben Ogle
b89e58e551 ThemeManager emits a reload event when reloaded 2013-08-19 15:55:15 -07:00
Ben Ogle
8730638ade Add directory and ImportPaths paths to themes 2013-08-19 15:55:15 -07:00
Kevin Sawicki & Nathan Sobo
347801b074 Merge branch 'summit'
Conflicts:
	src/app/config.coffee
	src/atom-application.coffee
	src/main.coffee
2013-08-19 14:01:24 -07:00
Kevin Sawicki
7f9b057c52 💄 2013-08-16 21:20:47 -07:00
Kevin Sawicki
647b5881a8 Remove TextBuffer::lineEndingForRow spec covered in telepath 2013-08-16 21:16:34 -07:00
Kevin Sawicki
9c76214fe9 Expect undefined instead of null for invalid buffer rows 2013-08-16 21:03:04 -07:00
Kevin Sawicki
3d5516fad9 Default to empty arrays for user and bundled package paths 2013-08-16 20:52:20 -07:00
Kevin Sawicki & Nathan Sobo
fe2baa18ca Use atom.getAvailablePackageNames() to load package specs 2013-08-16 11:35:43 -07:00
Kevin Sawicki & Nathan Sobo
a147dc01d7 Clear undo stack after setting initial buffer text 2013-08-16 11:30:37 -07:00
Kevin Sawicki & Nathan Sobo
2f4555a16f Add config.userPackageDirPaths which includes dev packages in dev mode 2013-08-16 11:18:08 -07:00
Ben Ogle
eea38a696f add a pane:became-inactive event 2013-08-15 17:28:14 -07:00
Kevin Sawicki & Nathan Sobo
f00bb58932 TokenizedBuffer constructor now takes an object 2013-08-14 16:35:10 -07:00
Kevin Sawicki & Nathan Sobo
ad36b2c6a6 Allow user package specs to override bundled package specs 2013-08-14 15:36:45 -07:00
Kevin Sawicki
c6d1409151 Merge branch 'master' into summit
Conflicts:
	.pairs
	package.json
	spec/app/tokenized-buffer-spec.coffee
	src/app/edit-session.coffee
	src/app/project.coffee
	src/app/window.coffee
	src/atom-application.coffee
	static/root-view.less
2013-08-14 14:05:35 -07:00
Kevin Sawicki
5235114eed Use fs.readdirSync() for listing package directories
Previously fsUtils.listTreeSync() was used which returns every path
in the tree, not just paths directly underneath the root path.

This speeds up the spec suite require time by not stat'ing the entire
node_modules directory.
2013-08-14 11:29:48 -07:00
Kevin Sawicki
b7a8e22d82 Set spec type after all specs in the category are required 2013-08-14 10:58:56 -07:00
Nathan Sobo
c6a0e385f7 Always include text in serialized buffer state; also include isModified
Previously, we were not including the text when serializing an
unmodified buffer. We would use the absence of the text field to
determine that the buffer was previously unmodified when deserializing.
The problem is that text now stores the markers associated with the
buffer, and we want to retain those across serialization regardless of
the modified status. So now I include the text always, along with an
isModified flag which if true, will tell to reload the buffer if it
has changed since we last serialized it. Reloading a buffer should
probably do a diff-and-patch in the future rather than replacing the
contents outright, so that we always preserve markers as best as we can.
2013-08-14 11:31:17 -06:00
Kevin Sawicki
41268c67d7 Remove internal packages section from spec reporter 2013-08-14 08:48:12 -07:00
Corey Johnson & Nathan Sobo
3c166edd26 Start switch to Telepath for undo/redo
Also, TextBuffer spec passes!
2013-08-13 17:34:31 -07:00
Kevin Sawicki
063d48c4ab Use ScopeSelector class from first-mate
Begin migrating TextMate helpers out of src/ and into the first-mate
package.
2013-08-12 16:22:18 -07:00
Kevin Sawicki
599a2ad021 Group specs into four sections
1. Core specs located in spec/
2. Internal package specs in src/packages
3. Bundled package specs in node_modules
4. User package specs in ~/.atom/packages
2013-08-09 17:24:07 -07:00
Kevin Sawicki
db649798ef Ignore missing symlinks in fsUtils.traverseTreeSync()
These were previously throwing an error from the call to
statSync().

Now statSync() is wrapped in a try block and only performed when
lstatSync() reports a symbolic link.
2013-08-09 17:23:29 -07:00
Kevin Sawicki
7e04d85e1e Log a warning when a theme fails to load
Previously Atom would fail to launch if a theme referenced in
the config was not found.
2013-08-09 11:25:07 -07:00
Nathan Sobo
0f14dd9420 Disable pane-splitting spec for now
We'll get it working once this branch gets merged to master.
2013-08-08 11:01:01 -06:00
Kevin Sawicki
de4e24582d Comma separate left and right matcher in or matcher 2013-08-07 18:20:41 -07:00
probablycorey
4629905b65 Remove all references to TextMate themes.
Let's not ship with TextMate theme support. Our .less theme files are
easier to read and write than TextMate themes. If we want to use
TextMate themes we should write a script that converts them to the 
Atom .less version.

Closes #629
2013-08-07 15:21:47 -07:00
Nathan Sobo
5f323cc67c Add TokenizedBuffer.bufferRangeForScopeAtPosition(selector, position)
You can call this method with a selector and a position and get the range
of any matching scope containing the given position, or a falsy value
if the scope does not match at that position.
2013-08-07 12:53:03 -06:00
Jason Rudolph & Nathan Sobo
39d15d6087 Add _.isSubset 2013-08-07 12:37:03 -06:00