Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Use native buffer implementation from superstring #225

Merged
merged 99 commits into from
Jun 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
6e9e098
Update patch calls now that Hunk has been renamed to Change
maxbrunsfeld Mar 30, 2017
495b92d
Start using superstring's native text buffer
maxbrunsfeld Mar 30, 2017
21e0214
Convert serialized patch to string during serialization
maxbrunsfeld Mar 30, 2017
35ccb7f
Temporarily use a github dependency for superstring
maxbrunsfeld Mar 31, 2017
864e16d
Don't call Buffer.from with undefined
maxbrunsfeld Mar 31, 2017
a0771ef
Emit the correct change event after reloading from disk
maxbrunsfeld Apr 20, 2017
268b69a
Flesh out .isModified implementation
maxbrunsfeld Apr 20, 2017
cc4ca99
Emit did-change and did-change-text events when loading buffer from disk
maxbrunsfeld May 2, 2017
dd4616e
Emit modified status changed event on initial load
maxbrunsfeld May 2, 2017
436328c
Update markers after loading buffer
maxbrunsfeld May 2, 2017
c38d49a
Emit onWillChange event when loading a buffer
maxbrunsfeld May 2, 2017
d0057fd
Rework .load - emit events more correctly and don't discard changes
maxbrunsfeld May 4, 2017
7780cea
Remove `backup` option to `saveAs`
maxbrunsfeld May 4, 2017
c66d349
Make .reload discard outstanding changes
maxbrunsfeld May 5, 2017
9ff5045
Move .save and .saveAs specs into text-buffer-io-spec file
maxbrunsfeld May 10, 2017
371662a
Move test for isModified and file deletion into text-buffer-io-spec
maxbrunsfeld May 10, 2017
6a7e9eb
Move encoding tests into text-buffer-io-spec
maxbrunsfeld May 10, 2017
7c68175
Make TextBuffer.save and .saveAs async
maxbrunsfeld May 10, 2017
a583763
:memo: Document return value of .save and .saveAs
maxbrunsfeld May 10, 2017
3649159
Merge branch 'master' into mb-use-native-buffer
maxbrunsfeld May 15, 2017
7ac3fac
:arrow_up: superstring (prerelease)
maxbrunsfeld May 15, 2017
195046b
:arrow_up: superstring (prerelease)
maxbrunsfeld May 15, 2017
108bdfe
:arrow_up: superstring (prerelease)
maxbrunsfeld May 15, 2017
cad8fda
Fix logic for falling back to preceding line's ending
maxbrunsfeld May 15, 2017
4d7e66f
Fix lint errors in text-buffer-io-spec
maxbrunsfeld May 15, 2017
75b0280
Don't treat lone CR as line ending in display layer spec
maxbrunsfeld May 15, 2017
ed039bb
Use onDidChangeModified in buffer serialization spec
maxbrunsfeld May 15, 2017
2f46703
Put file-to-delete in a temp directory in IO spec
maxbrunsfeld May 16, 2017
630f1ab
Make TextBuffer.deserialize async, Add static .load and .loadSync met…
maxbrunsfeld May 17, 2017
2b8caa4
13.0.0-0
maxbrunsfeld May 17, 2017
b3659f5
Fix lint errors
maxbrunsfeld May 17, 2017
3e18e23
Merge remote-tracking branch 'origin/master' into mb-use-native-buffer
maxbrunsfeld May 17, 2017
01a8cae
Allow TextBuffers to be backed by custom File objects
maxbrunsfeld May 17, 2017
cf86888
:arrow_up: superstring (prerelease)
maxbrunsfeld May 17, 2017
3343837
Add docs for TextBuffer's custom file API
maxbrunsfeld May 17, 2017
5028735
Fix test descriptions
maxbrunsfeld May 17, 2017
c43518d
:arrow_up: superstring (prerelease)
maxbrunsfeld May 18, 2017
2ec262e
Don't respond to file change events while saving
maxbrunsfeld May 19, 2017
fc94888
Avoid unnecessary marker update and event emitting on initial load
maxbrunsfeld May 19, 2017
b068237
Handle null passed to setPath
maxbrunsfeld May 19, 2017
44e9956
Make reload work when the file doesn't exist
maxbrunsfeld May 19, 2017
730c29a
Remove deprecated .load calls in tests
maxbrunsfeld May 19, 2017
93e6803
Add atom jasmine 2 test runner
maxbrunsfeld May 19, 2017
1a1c2ed
:arrow_up: superstring (prerelease)
maxbrunsfeld May 19, 2017
a8b4029
13.0.0-1
maxbrunsfeld May 19, 2017
289a73a
Avoid removing watched file to make test pass on windows
maxbrunsfeld May 19, 2017
7e59cce
:arrow_up: superstring (prerelease)
maxbrunsfeld May 19, 2017
5e85e35
Allow saving to files in non-existent directories
maxbrunsfeld May 20, 2017
dbcf725
13.0.0-2
maxbrunsfeld May 20, 2017
9c49e64
:shirt:
maxbrunsfeld May 20, 2017
b1ba907
Wait until save completes in conflict-handling test
maxbrunsfeld May 22, 2017
92f4b12
:arrow_up: superstring (prerelease)
maxbrunsfeld May 22, 2017
fda3534
:arrow_up: superstring (prerelease)
maxbrunsfeld May 22, 2017
90f458f
Add experimental async search API
maxbrunsfeld May 22, 2017
a5157a4
Cache buffer's base digest and full text
maxbrunsfeld May 23, 2017
6cb7f35
13.0.0-3
maxbrunsfeld May 23, 2017
4404c71
:shirt:
maxbrunsfeld May 23, 2017
b32d8d1
Emit reload events when file changes on disk
maxbrunsfeld May 23, 2017
4db782d
Clear native buffer's base text when TextBuffer is destroyed
maxbrunsfeld May 23, 2017
473fe6b
13.0.0-4
maxbrunsfeld May 23, 2017
4898457
Emit did-reload event when file doesn't exist
maxbrunsfeld May 23, 2017
c8fd990
13.0.0-5
maxbrunsfeld May 23, 2017
2e20bc9
:arrow_up: superstring (prerelease)
maxbrunsfeld May 23, 2017
44b0aaa
13.0.0-6
maxbrunsfeld May 23, 2017
b8198da
:arrow_up: superstring (prerelease)
maxbrunsfeld May 30, 2017
a8982fc
13.0.0-7
maxbrunsfeld May 30, 2017
b082f69
:arrow_up: superstring (prerelease)
maxbrunsfeld May 31, 2017
a4f3bbe
13.0.0-8
maxbrunsfeld May 31, 2017
856d57d
Remove caching in getText
maxbrunsfeld Jun 1, 2017
f25ec13
13.0.0-9
maxbrunsfeld Jun 1, 2017
6137003
:arrow_up: pathwatcher (prerelease)
maxbrunsfeld Jun 1, 2017
01030c0
13.0.0-10
maxbrunsfeld Jun 1, 2017
c5ebdaf
Revert "Remove caching in getText"
maxbrunsfeld Jun 1, 2017
d8f1903
:arrow_up: pathwatcher (prerelease)
maxbrunsfeld Jun 1, 2017
fd1a4ec
13.0.0-11
maxbrunsfeld Jun 1, 2017
e7ae6a8
Avoid running unnecessary loop in spliceArray
maxbrunsfeld Jun 1, 2017
f54d477
Clear cached text when buffer is destroyed
maxbrunsfeld Jun 2, 2017
ec71c62
13.0.0-12
maxbrunsfeld Jun 2, 2017
b4cee55
Increase the debounce interval for fs change events
maxbrunsfeld Jun 5, 2017
ce13dab
:arrow_up: superstring (prerelease)
maxbrunsfeld Jun 6, 2017
233e8ed
13.0.0-13
maxbrunsfeld Jun 6, 2017
436f232
:arrow_up: superstring (prerelease)
maxbrunsfeld Jun 6, 2017
32867ab
13.0.0-14
maxbrunsfeld Jun 6, 2017
4bd2f28
Add an option to avoid serializing TextBuffers' history
maxbrunsfeld Jun 6, 2017
0812e29
Suppress reloads that finish after another reload has already started
maxbrunsfeld Jun 6, 2017
2eb2906
:arrow_up: superstring (prerelease)
maxbrunsfeld Jun 6, 2017
ef44c42
13.0.0-15
maxbrunsfeld Jun 6, 2017
64e1c38
Fix bug in undo after save
maxbrunsfeld Jun 7, 2017
7114438
:arrow_up: superstring (prerelease)
maxbrunsfeld Jun 7, 2017
e56fe83
13.0.0-16
maxbrunsfeld Jun 7, 2017
e8f68d9
Emit minimal change event when reloading the buffer
maxbrunsfeld Jun 7, 2017
d2ae05f
Use a recent GCC version on travis
maxbrunsfeld Jun 7, 2017
7eb2f87
Handle state serialized from old versions of TextBuffer
maxbrunsfeld Jun 7, 2017
effd4e5
13.0.0-17
maxbrunsfeld Jun 7, 2017
a4d0292
Fix bugs in serialization of buffers with text but no file
maxbrunsfeld Jun 7, 2017
d81acad
Speed up loading using some new superstring features
maxbrunsfeld Jun 8, 2017
b2b27a3
13.0.0-18
maxbrunsfeld Jun 8, 2017
1e500e8
Fix error when loadSync is called with a non-existent path
maxbrunsfeld Jun 8, 2017
0eb775c
13.0.0-19
maxbrunsfeld Jun 8, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sudo: false
node_js: 6

env:
- CC=clang CXX=clang++
- CXX=g++-6 CC=gcc-6

script: npm run ci

Expand All @@ -20,3 +20,11 @@ notifications:
email:
on_success: never
on_failure: change

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "text-buffer",
"version": "12.1.4",
"version": "13.0.0-19",
"description": "A container for large mutable strings with annotated regions",
"main": "./lib/text-buffer",
"scripts": {
Expand All @@ -20,8 +20,10 @@
"bugs": {
"url": "https://github.com/atom/text-buffer/issues"
},
"atomTestRunner": "atom-jasmine2-test-runner",
"license": "MIT",
"devDependencies": {
"atom-jasmine2-test-runner": "^0.7.0",
"coffee-cache": "^0.2.0",
"coffee-script": "^1.10.0",
"coffeelint": "1.16.0",
Expand All @@ -39,21 +41,22 @@
"jasmine-core": "^2.4.1",
"json-diff": "^0.3.1",
"random-seed": "^0.2.0",
"rimraf": "~2.2.2",
"regression": "^1.2.1",
"rimraf": "~2.2.2",
"temp": "^0.8.3",
"yargs": "^6.5.0"
},
"dependencies": {
"superstring": "1.4.0",
"delegato": "^1.0.0",
"diff": "^2.2.1",
"emissary": "^1.0.0",
"event-kit": "^2.1.0",
"fs-plus": "^3.0.0",
"grim": "1.5.0",
"pathwatcher": "^7.0.0",
"grim": "^2.0.1",
"mkdirp": "^0.5.1",
"pathwatcher": "7.1.0-1",
"serializable": "^1.0.3",
"superstring": "1.3.0-21",
"underscore-plus": "^1.0.0"
}
}
6 changes: 3 additions & 3 deletions spec/display-layer-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ describe('DisplayLayer', () => {

it('renders end of line invisibles, appropriately decorated', () => {
const buffer = new TextBuffer({
text: 'a\nb\n\nd e f\r\ngh\rij\n\r\n'
text: 'a\nb\n\nd e f\r\ngh\r\nij\n\r\n'
})

const displayLayer = buffer.addDisplayLayer({
Expand All @@ -1366,7 +1366,7 @@ describe('DisplayLayer', () => {
}
})

expect(displayLayer.getText()).toBe('a¬\nb¬\n¬\nd e f¤¬\ngh¤\nij¬\n¤¬\n')
expect(displayLayer.getText()).toBe('a¬\nb¬\n¬\nd e f¤¬\ngh¤¬\nij¬\n¤¬\n')

expectTokenBoundaries(displayLayer, [
{
Expand Down Expand Up @@ -1430,7 +1430,7 @@ describe('DisplayLayer', () => {
open: []
},
{
text: '¤',
text: '¤¬',
close: [],
open: ['invisible-character eol']
},
Expand Down
Loading