Commit Graph

2753 Commits

Author SHA1 Message Date
Kevin Sawicki & Nathan Sobo
85cc81851f Replicate insertion and removal of project buffers
Buffers are now destroyed when removed from the project if they
haven't been destroyed already.
2013-07-05 12:53:50 -07:00
Kevin Sawicki
f766bbbb38 Remove Point and Range classes now provided by telepath 2013-07-05 12:53:50 -07:00
Kevin Sawicki
e5ef23dc5a Expect null instead of undefined for invalid line rows 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo
05a3f35512 Normalize line endings in TextBuffer.change() 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo
72f9af4d00 Replicate buffer changes
Still some failures due to line endings
2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo
dd0f7a032f Start basing Buffer's text on a replicable string 2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo
da3a89fc27 Don't show pane items that can't be deserialized 2013-07-05 12:53:49 -07:00
Nathan Sobo
30e4531a8f Store buffer paths instead of serialized buffers in EditSession state
Since there can be multiple edit sessions per buffer, it doesn't make
sense to serialize the buffer multiple times. Previously, we were
de-duplicating buffers in the deserialize method itself, but this won't
work now that we want to replicate buffers.
2013-07-05 12:53:49 -07:00
Kevin Sawicki
651bbaa3ce Create an empty ~/.atom/config.cson when missing
Closes #614
2013-07-05 09:17:44 -07:00
Kevin Sawicki
b786bcc774 Store views that don't implement setModel() by their item
Previously viewForItem() would create a new view each time it was called
with an item whose view did not implement setModel() even if a view for that
item already existed in the pane.

Now a WeakMap is used to map items to their view so they can be reused
and cleaned up even when the view does not implement setModel().
2013-07-02 09:41:46 -07:00
Kevin Sawicki
7e76721712 Don't call realpathSync for non-existent directory 2013-07-01 13:23:47 -07:00
Kevin Sawicki
cde9ae02fe Prevent clash between path require and variable name 2013-07-01 13:07:35 -07:00
Kevin Sawicki
77017c2cd3 Compare against realpath of HOME 2013-07-01 12:59:31 -07:00
Kevin Sawicki
7615d54337 Support calling fsUtils.absolute() with a '~' path 2013-07-01 12:46:50 -07:00
Kevin Sawicki & Nathan Sobo
268edf16d8 Make setModel optional in pane item view classes 2013-07-01 10:53:34 -07:00
Kevin Sawicki
01f220fb1b Support non-English keyboard languages
Use event.which if it is lower than the parsed key identifier.
This is the case when a non-English keyboard language is selected and
a physical English keyboard is being used.

This allows keybindings to still work even when the physical key pressed
is different than the key it maps to for the currently selected language.

Closes #585
2013-06-28 16:36:55 -07:00
Nathan Sobo
b66431e3a6 Delete atom.windowState in global afterEach
It seems like the windowState was getting saved to disk, causing weird
window state to be loaded on the next test run and a spec to fail.
2013-06-28 04:39:31 -06:00
Kevin Sawicki
8561bb34a8 Save and restore spec window dimensions
Closes #597
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
d55c09c9d3 Nuke documentation threshold specs
We're going to make it a lint task that's run via grunt.
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
f4300b8cab Fix specs due to scrollTop/Left becoming methods on EditSession 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
c596514d11 Accept documents in EditSession and replicate scroll position 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
390b03647e Don't clear #jasmine-content when window.debugContent is true 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo
95e69ad858 Use .getState() instead of .serialize() in replication specs 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
ef0363e8ff Use jasmine-focused npm instead of spec/jasmine-focused.coffee 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
a62cd0f16a Replicate active pane item 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
f340828506 Use .getState() instead of .serialize() when mutating panes 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
8b0a68dd4a Return this from $.fn.attachToDom spec helper 2013-06-28 04:39:29 -06:00
Kevin Sawicki
1049a677bf Set dimension of spec window 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo
0851b4d011 Replicate pane splitting and removal
We're using Peer.js to stream changes to shared telepath documents
between participants.

We're replacing the rootView of joiners in a somewhat hacky way,
but replication of pane splits and items is fully tested.
2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo
8a7c57994d Remove parens from require 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo
6480e956af Keep resident window state object 2013-06-28 04:39:26 -06:00
Cheng Zhao
e1c2aa0da1 Fix specs regarding beforeunload event. 2013-06-27 21:31:07 +08:00
Cheng Zhao
bdbec54f24 Make PaneContainer.confirmClose() synchronous. 2013-06-27 16:21:14 +08:00
Cheng Zhao
1df48d1725 Fix spec of confirmSync in 'window:close'. 2013-06-27 15:07:38 +08:00
Cheng Zhao
6c0f4c09d9 Make Pane.promptToSaveItem synchronous. 2013-06-27 12:40:36 +08:00
Kevin Sawicki
e67676b01c Use deleteSelectedText() instead of delete()
Selection.delete() adds to the selection if it is empty which
we don't want to do when replacing selected text.

Closes #603
2013-06-26 19:03:45 -07:00
Kevin Sawicki
86c8343107 Score grammar matches using longest fileType match
Previously the score for two grammars matching on path
was equal and so the first one would be selected.

Now the longer match will have a higher score and will be selected
over other grammars with shorter fileType match lengths.

Closes #602
2013-06-24 18:23:54 -07:00
probablycorey
e72c48607b Fix doc specs 2013-06-20 17:15:52 -07:00
probablycorey
3e91334c82 Bundle themes are no longer copied 2013-06-20 17:15:52 -07:00
Corey Johnson & Nathan Sobo
b9accadb70 When normalizing indent, ignore leading spaces of first line
Fixes #594
2013-06-19 12:21:05 -06:00
Kevin Sawicki
1764677b7d Unsubscribe markers when destroying display buffer
Previously the display buffer markers would still fire events
even after a display buffer was destroyed since they were not
being unsubscribed from their underlying buffer marker which
could still fire events in the case of an editor split on the
same buffer.

Closes #593
2013-06-19 09:56:55 -07:00
Kevin Sawicki
1178d844d0 Look before and after empty lines for max indent level
Previously the indentation guide level for empty lines was
derived by only looking after the empty line which caused gaps
in certain cases.

Now the indentation for an empty line is the higher value of the
previous non-empty line indentation and the following non-empty
line indentation.

Closes #588
2013-06-18 09:56:31 -07:00
Kevin Sawicki
bc2d0ff0cc Only check ending rules when stack size increases
Previously on zero length matches the last two rules were compared
and if they had the same scope name then the last rule was popped
and the remaining line was tokenized using the current scope stack
to prevent infinite parsing loops.

This caused nested method calls in Java to not tokenize correctly
since method rules were sequential in the stack but did not constitute
an infinite loop of zero matches since the stack was currently decreasing.

Now the last two rules are only compared when the stack size is increasing
to prevent this false positive.

Closes #587
2013-06-17 13:08:10 -07:00
Kevin Sawicki
2826d50cbb Remove logging of pid 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki
8c4bddac9f Add spec for Task.once() 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki
2a7d35cc39 Remove spec that was renamed to task-spec.coffee 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki
8389698958 Drop suffix from handler path 2013-06-17 12:11:26 -07:00
Kevin Sawicki
8280b3a3ff Update repository status to use new task style 2013-06-17 12:11:25 -07:00
Kevin Sawicki
e8bf433c68 Remove unused class 2013-06-17 12:11:25 -07:00
Kevin Sawicki
b42cc6f683 Update spell check view to use new task 2013-06-17 12:11:25 -07:00