Nathan Sobo
acc0503684
Merge remote-tracking branch 'origin/master' into config
...
Conflicts:
src/app/keymap.coffee
src/extensions/outline-view/src/keymap.coffee
src/extensions/outline-view/src/tag-reader.coffee
src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:32:05 -07:00
Corey Johnson
69485724cd
Buffer emits a contents-modified event when it's contents differ from disk.
...
Including when the Buffer's file is removed via another process.
2012-11-29 12:05:05 -08:00
Corey Johnson
ae00e888fd
un-f buffer spec
2012-11-29 10:36:56 -08:00
Corey Johnson
04c4c45190
💄
2012-11-29 08:53:39 -08:00
Corey Johnson & Nathan Sobo
e98b4f9a9b
Use file contents instead of md5 to determine disk change
2012-11-28 17:16:44 -08:00
Corey Johnson & Nathan Sobo
ac84a8ab0a
Destroy buffer to avoid leaking a path watch
2012-11-28 17:13:32 -07:00
Corey Johnson & Nathan Sobo
d6009df44e
Buffers retain path when file is deleted and can be re-saved
...
Path watching resumes once the file is saved again. This commit allows files to be created for as-yet nonexistent paths. We won't call `$native.watchPath` until we have at least 1 subscription to the file in JS and the file exists on disk.
Also, we moved execution of the path watcher callbacks until after the callbacks data structure is updated in order to avoid confusing behavior in specs.
2012-11-28 16:55:10 -07:00
Corey Johnson & Nathan Sobo
eb0414f4e7
Emit a contents-conflicted` event instead of contents-change-on-disk
2012-11-28 15:21:12 -07:00
Corey Johnson & Nathan Sobo
d5d4751776
Don't set Buffer's file to null when the file is deleted (retain path)
2012-11-28 13:40:37 -07:00
Corey Johnson & Nathan Sobo
f9563f5e55
Fix PathWatcher failures
...
Now when a file is removed, we always remove its subscriptions and its kevent.
2012-11-19 13:16:14 -07:00
Corey Johnson
d9a3fbd910
BufferSpec doesn't double release buffers
2012-11-15 13:16:12 -08:00
Nathan Sobo
4a84c5f8f9
Add 'stopped-changing' event to buffer. Fires 300ms after last change.
...
This will be used by the status bar and other expensive code that needs to respond to the buffer changing, but that we don't want running on every single keystroke when the user is typing quickly.
2012-11-14 15:33:44 -07:00
Nathan Sobo
632bba5609
Kill dead code in spec
2012-11-14 15:13:50 -07:00
Corey Johnson
dbf8639375
Rename anchor.ignoreEqual to anchor.ignoreChangesStartingOnAnchor
2012-10-31 14:27:31 -07:00
Corey Johnson
84ea1017f4
Anchor.ignoreEqual works properly
...
The anchor ignores buffer changes when ignoreEqual is true and the oldRange.start == anchor.position
2012-10-31 14:27:21 -07:00
Corey Johnson
7793a04172
Filled in anchor specs
2012-10-31 14:27:07 -07:00
Kevin Sawicki
2531665570
Add Buffer.isEmpty()
...
To be used by Buffer.isModified() for when the
buffer has no backing file
2012-10-27 08:57:55 -07:00
Kevin Sawicki
acb5207d28
Treat file-less buffers as unmodified when empty
2012-10-26 13:56:21 -07:00
Corey Johnson & Nathan Sobo
adf00b60f3
Detect softTabs/hardTabs when an EditSession is created
2012-10-26 12:20:14 -06:00
Nathan Sobo
d310297fe7
Radically simplify the definition of "modified" for buffers
...
Now, we maintain md5 signatures for the on-disk and in-memory contents of the buffer. Whenever either contents change, we recompute the signature and store it on the buffer. We can tell if the buffer is modified by comparing these signatures. When the disk contents change, we compare the memory and disk signatures *before* recomputing the disk signature to determine whether to update the buffer or mark it as a conflict.
2012-10-25 13:08:38 -06:00
Corey Johnson
533ad84d03
Buffer.scanInRange can do a case-insensitive search
2012-09-25 16:30:44 -07:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00
Nathan Sobo
1886b2a48e
Merge branch 'master' of github.com:github/atom into global-find
...
Conflicts:
spec/app/buffer-spec.coffee
spec/extensions/command-panel-spec.coffee
spec/extensions/tree-view-spec.coffee
src/app/buffer.coffee
src/extensions/command-panel/command-panel.coffee
src/extensions/command-panel/keymap.coffee
2012-07-25 13:38:12 -06:00
Nathan Sobo
454557b502
Merge branch 'master' into global-find
...
Conflicts:
spec/extensions/command-panel-spec.coffee
src/app/buffer.coffee
src/extensions/command-panel/command-panel.coffee
src/extensions/command-panel/keymap.coffee
2012-07-24 17:59:49 -06:00
Corey Johnson
e491fe7bb7
Clean up after tests
2012-07-24 10:52:42 -07:00
Corey Johnson & Nathan Sobo
239fd2f9e6
buffer triggers a 'path-change' event when a file is moved or removed
2012-07-24 10:34:30 -07:00
Corey Johnson & Nathan Sobo
9658cf61ff
Buffer.getPath() returns null when the buffer's file is deleted on disk
2012-07-23 16:35:24 -07:00
Nathan Sobo
c05fa7dc6f
Merge branch 'master' into global-find
...
Conflicts:
src/app/buffer.coffee
2012-07-20 19:01:38 -06:00
Corey Johnson & Nathan Sobo
b959d5aa37
Buffers are memoized on project by path
2012-07-18 12:56:09 -07:00
Corey Johnson & Nathan Sobo
c3fe9aa0b3
Implement refcounting scheme on Buffer
2012-07-17 14:24:33 -06:00
Corey Johnson
5914b6cc2a
Add Buffer.reload()
2012-07-16 16:12:09 -07:00
Corey Johnson
611eb93219
Buffer stores a is modified on disk flag
2012-07-16 16:11:52 -07:00
Corey Johnson & Nathan Sobo
926067164d
Buffer updates anchors when it changes instead of EditSession
2012-07-13 17:42:41 -06:00
David Graham & Nathan Sobo
6fbd019b1d
Pull out a BufferChangeOperation, which Buffer.change sends to UndoManager
2012-07-05 19:07:12 -06:00
Corey Johnson & Nathan Sobo
b59bd4bc7b
Saving a buffer does not trigger a "contents-change" event
2012-07-02 17:48:30 -07:00
Nathan Sobo
7387ad13f6
Merge branch 'master' of https://github.com/github/atom
2012-07-02 13:13:51 -06:00
Nathan Sobo
6b3180e144
Ensure path is present before building a Buffer with it in spec
2012-07-02 13:13:25 -06:00
Corey Johnson
10bfc56624
When a Buffer is created, the initial call to setText is not treated as an undoable change.
2012-07-02 11:39:22 -07:00
Corey Johnson
ae34611d2a
Changes to buffer (via external process) do set buffer as modified.
2012-07-02 09:13:05 -07:00
Corey Johnson
c3d7d3566f
Buffer listens for changes to file and triggers 'contents-change' event
2012-06-29 15:09:31 -07:00
Corey Johnson
3dd9253bc5
When Buffer's path changes, stop listening for events on former path
2012-06-29 15:09:01 -07:00
Corey Johnson
8e7a8836cd
Unmodified buffer updates contents when file changes outside of atom.
2012-06-29 15:09:01 -07:00
Corey Johnson & Nathan Sobo
4659fd7dc3
Project.open returns an editSession instead of a buffer.
...
First step in removing the coupling of Editor and Buffer. Editor should get all information about the active buffer from the activeEditSession.
2012-06-20 09:28:22 -07:00
Corey Johnson
b841a04093
Don't serialize pathless buffer text
2012-06-12 15:12:58 -07:00
Corey Johnson
1fb8852fc3
Saving a buffer sets its modified flag to false
2012-06-12 11:29:38 -07:00
Corey Johnson
9339791260
Set modified flag to true when there is a buffer change.
2012-06-12 10:52:11 -07:00
Corey Johnson & Nathan Sobo
51ec8b4ca2
💄
2012-05-30 15:57:03 -06:00
Corey Johnson & Nathan Sobo
5e1d7c774c
Serialized Editor state no longer contains Buffer objects
2012-04-18 15:57:58 -07:00
Nathan Sobo
0a9e14a408
Buffers emit 'before-save' and 'after-save' events during save
2012-04-17 17:45:40 -06:00