Skip to content

Instantly share code, notes, and snippets.

@benogle
Last active August 29, 2015 14:04
Show Gist options
  • Save benogle/dc81fc7bb841e5926258 to your computer and use it in GitHub Desktop.
Save benogle/dc81fc7bb841e5926258 to your computer and use it in GitHub Desktop.
{
"main": "./src/text-buffer.coffee",
"files": {
"./Gruntfile.coffee": {
"objects": {},
"exports": 0
},
"./spec/marker-spec.coffee": {
"objects": {
"0": {
"1": {
"type": "import",
"range": [
[
0,
1
],
[
0,
10
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "difference",
"exportsProperty": "difference"
}
},
"1": {
"13": {
"name": "TextBuffer",
"type": "import",
"range": [
[
1,
13
],
[
1,
40
]
],
"bindingType": "variable",
"path": "../src/text-buffer"
}
}
},
"exports": {}
},
"./spec/spec-helper.coffee": {
"objects": {},
"exports": {}
},
"./spec/text-buffer-spec.coffee": {
"objects": {
"0": {
"1": {
"type": "import",
"range": [
[
0,
1
],
[
0,
10
]
],
"bindingType": "variable",
"module": "fs-plus@2.x",
"name": "existsSync",
"exportsProperty": "existsSync"
},
"13": {
"type": "import",
"range": [
[
0,
13
],
[
0,
20
]
],
"bindingType": "variable",
"module": "fs-plus@2.x",
"name": "moveSync",
"exportsProperty": "moveSync"
},
"23": {
"type": "import",
"range": [
[
0,
23
],
[
0,
34
]
],
"bindingType": "variable",
"module": "fs-plus@2.x",
"name": "readFileSync",
"exportsProperty": "readFileSync"
},
"37": {
"type": "import",
"range": [
[
0,
37
],
[
0,
46
]
],
"bindingType": "variable",
"module": "fs-plus@2.x",
"name": "removeSync",
"exportsProperty": "removeSync"
},
"49": {
"type": "import",
"range": [
[
0,
49
],
[
0,
61
]
],
"bindingType": "variable",
"module": "fs-plus@2.x",
"name": "writeFileSync",
"exportsProperty": "writeFileSync"
}
},
"1": {
"1": {
"type": "import",
"range": [
[
1,
1
],
[
1,
4
]
],
"bindingType": "variable",
"module": "path",
"builtin": true,
"name": "join",
"exportsProperty": "join"
}
},
"2": {
"7": {
"name": "temp",
"type": "import",
"range": [
[
2,
7
],
[
2,
20
]
],
"bindingType": "variable",
"module": "temp"
}
},
"3": {
"1": {
"type": "import",
"range": [
[
3,
1
],
[
3,
4
]
],
"bindingType": "variable",
"module": "pathwatcher@^2.0.2",
"name": "File",
"exportsProperty": "File"
}
},
"4": {
"13": {
"name": "TextBuffer",
"type": "import",
"range": [
[
4,
13
],
[
4,
40
]
],
"bindingType": "variable",
"path": "../src/text-buffer"
}
},
"5": {
"13": {
"name": "SampleText",
"type": "function",
"range": [
[
5,
13
],
[
5,
74
]
],
"doc": null
}
}
},
"exports": {}
},
"./src/buffer-patch.coffee": {
"objects": {
"0": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
0,
15
],
[
0,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"1": {
"8": {
"name": "Range",
"type": "import",
"range": [
[
1,
8
],
[
1,
24
]
],
"bindingType": "variable",
"path": "./range"
}
},
"8": {
"0": {
"type": "class",
"name": "BufferPatch",
"bindingType": "exports",
"classProperties": [],
"prototypeProperties": [
[
11,
19
],
[
18,
21
],
[
25,
10
],
[
34,
11
],
[
37,
18
]
],
"doc": " Private: Represents a single change to {TextBuffer}. We reify the change into an object\nso it can be stored in the undo/redo stack of {History}. Changes to the buffer\ncan be associated with changes to markers in addition to text, so this also\ncontains a hash of {MarkerPatch} objects. ",
"range": [
[
8,
0
],
[
38,
36
]
]
}
},
"11": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
11,
19
],
[
18,
1
]
],
"doc": null
}
},
"18": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
18,
21
],
[
25,
1
]
],
"doc": null
}
},
"25": {
"10": {
"name": "invert",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"buffer"
],
"range": [
[
25,
10
],
[
34,
1
]
],
"doc": null
}
},
"34": {
"11": {
"name": "applyTo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"buffer"
],
"range": [
[
34,
11
],
[
37,
1
]
],
"doc": null
}
},
"37": {
"18": {
"name": "addMarkerPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
37,
18
],
[
38,
36
]
],
"doc": null
}
}
},
"exports": 8
},
"./src/helpers.coffee": {
"objects": {
"0": {
"23": {
"name": "100000",
"type": "primitive",
"range": [
[
0,
23
],
[
0,
28
]
]
}
},
"3": {
"15": {
"name": "spliceArray",
"bindingType": "variable",
"type": "function",
"paramNames": [
"originalArray",
"start",
"length",
"insertedArray"
],
"range": [
[
3,
15
],
[
14,
1
]
],
"doc": null
}
},
"14": {
"16": {
"name": "/\\r\\n|\\n|\\r/g",
"type": "primitive",
"range": [
[
14,
16
],
[
14,
28
]
]
}
}
},
"exports": 3
},
"./src/history.coffee": {
"objects": {
"0": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
0,
15
],
[
0,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"1": {
"14": {
"name": "Transaction",
"type": "import",
"range": [
[
1,
14
],
[
1,
36
]
],
"bindingType": "variable",
"path": "./transaction"
}
},
"2": {
"14": {
"name": "BufferPatch",
"type": "import",
"range": [
[
2,
14
],
[
2,
37
]
],
"bindingType": "variable",
"path": "./buffer-patch"
}
},
"4": {
"25": {
"name": "TransactionAborted",
"type": "function",
"range": [
[
4,
25
],
[
4,
52
]
],
"doc": null
}
},
"8": {
"0": {
"type": "class",
"name": "History",
"bindingType": "exports",
"classProperties": [],
"prototypeProperties": [
[
11,
22
],
[
12,
20
],
[
13,
21
],
[
18,
19
],
[
23,
21
],
[
30,
18
],
[
37,
8
],
[
45,
8
],
[
51,
12
],
[
66,
20
],
[
70,
21
],
[
75,
20
],
[
84,
17
],
[
87,
18
],
[
90,
18
]
],
"doc": " Private: Manages undo/redo for {TextBuffer} ",
"range": [
[
8,
0
],
[
91,
25
]
]
}
},
"11": {
"22": {
"name": "currentTransaction",
"type": "primitive",
"range": [
[
11,
22
],
[
11,
25
]
],
"bindingType": "prototypeProperty"
}
},
"12": {
"20": {
"name": "transactionDepth",
"type": "primitive",
"range": [
[
12,
20
],
[
12,
20
]
],
"bindingType": "prototypeProperty"
}
},
"13": {
"21": {
"name": "transactCallDepth",
"type": "primitive",
"range": [
[
13,
21
],
[
13,
21
]
],
"bindingType": "prototypeProperty"
}
},
"18": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
18,
19
],
[
23,
1
]
],
"doc": null
}
},
"23": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
23,
21
],
[
30,
1
]
],
"doc": null
}
},
"30": {
"18": {
"name": "recordNewPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
30,
18
],
[
37,
1
]
],
"doc": null
}
},
"37": {
"8": {
"name": "undo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
37,
8
],
[
45,
1
]
],
"doc": " Public: Undo the last operation. If a transaction is in progress, aborts it. "
}
},
"45": {
"8": {
"name": "redo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
45,
8
],
[
51,
1
]
],
"doc": " Public: Redo the last operation "
}
},
"51": {
"12": {
"name": "transact",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"fn"
],
"range": [
[
51,
12
],
[
66,
1
]
],
"doc": " Public: Batch multiple operations as a single undo/redo step.\n\nAny group of operations that are logically grouped from the perspective of\nundoing and redoing should be performed in a transaction. If you want to\nabort the transaction, call {::abortTransaction} to terminate the function's\nexecution and revert any changes performed up to the abortion.\n\nfn - A {Function} to call inside the transaction. "
}
},
"66": {
"20": {
"name": "beginTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
66,
20
],
[
70,
1
]
],
"doc": " Public: Start an open-ended transaction.\n\nCall {::commitTransaction} or {::abortTransaction} to terminate the\ntransaction. If you nest calls to transactions, only the outermost\ntransaction is considered. You must match every begin with a matching\ncommit, but a single call to abort will cancel all nested transactions. "
}
},
"70": {
"21": {
"name": "commitTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
70,
21
],
[
75,
1
]
],
"doc": " Public: Commit an open-ended transaction started with {::beginTransaction}\nand push it to the undo stack.\n\nIf transactions are nested, only the outermost commit takes effect. "
}
},
"75": {
"20": {
"name": "abortTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
75,
20
],
[
84,
1
]
],
"doc": " Public: Abort an open transaction, undoing any operations performed so far\nwithin the transaction. "
}
},
"84": {
"17": {
"name": "isTransacting",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
84,
17
],
[
87,
1
]
],
"doc": null
}
},
"87": {
"18": {
"name": "clearUndoStack",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
87,
18
],
[
90,
1
]
],
"doc": " Public: Clear the undo stack. "
}
},
"90": {
"18": {
"name": "clearRedoStack",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
90,
18
],
[
91,
25
]
],
"doc": null
}
}
},
"exports": 8
},
"./src/marker-manager.coffee": {
"objects": {
"0": {
"19": {
"name": "IntervalSkipList",
"type": "import",
"range": [
[
0,
19
],
[
0,
46
]
],
"bindingType": "variable",
"module": "interval-skip-list@^2.0.0"
}
},
"1": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
1,
15
],
[
1,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"2": {
"12": {
"name": "Delegator",
"type": "import",
"range": [
[
2,
12
],
[
2,
29
]
],
"bindingType": "variable",
"module": "delegato@1.x"
}
},
"3": {
"1": {
"type": "import",
"range": [
[
3,
1
],
[
3,
4
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "omit",
"exportsProperty": "omit"
},
"7": {
"type": "import",
"range": [
[
3,
7
],
[
3,
14
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "defaults",
"exportsProperty": "defaults"
},
"17": {
"type": "import",
"range": [
[
3,
17
],
[
3,
22
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "values",
"exportsProperty": "values"
},
"25": {
"type": "import",
"range": [
[
3,
25
],
[
3,
29
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "clone",
"exportsProperty": "clone"
},
"32": {
"type": "import",
"range": [
[
3,
32
],
[
3,
38
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "compact",
"exportsProperty": "compact"
},
"41": {
"type": "import",
"range": [
[
3,
41
],
[
3,
52
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "intersection",
"exportsProperty": "intersection"
},
"55": {
"type": "import",
"range": [
[
3,
55
],
[
3,
58
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "keys",
"exportsProperty": "keys"
},
"61": {
"type": "import",
"range": [
[
3,
61
],
[
3,
63
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "max",
"exportsProperty": "max"
},
"66": {
"type": "import",
"range": [
[
3,
66
],
[
3,
69
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "size",
"exportsProperty": "size"
}
},
"4": {
"9": {
"name": "Marker",
"type": "import",
"range": [
[
4,
9
],
[
4,
26
]
],
"bindingType": "variable",
"path": "./marker"
}
},
"5": {
"8": {
"name": "Point",
"type": "import",
"range": [
[
5,
8
],
[
5,
24
]
],
"bindingType": "variable",
"path": "./point"
}
},
"6": {
"8": {
"name": "Range",
"type": "import",
"range": [
[
6,
8
],
[
6,
24
]
],
"bindingType": "variable",
"path": "./range"
}
},
"10": {
"0": {
"type": "class",
"name": "MarkerManager",
"bindingType": "exports",
"classProperties": [],
"prototypeProperties": [
[
17,
16
],
[
28,
18
],
[
35,
19
],
[
42,
21
],
[
48,
13
],
[
54,
16
],
[
57,
13
],
[
60,
14
],
[
63,
18
],
[
66,
15
],
[
113,
16
],
[
121,
16
],
[
124,
21
],
[
128,
22
],
[
131,
16
],
[
135,
21
],
[
138,
22
]
],
"doc": " Private: Manages the markers for a buffer. ",
"range": [
[
10,
0
],
[
139,
62
]
]
}
},
"17": {
"16": {
"name": "nextMarkerId",
"type": "primitive",
"range": [
[
17,
16
],
[
17,
16
]
],
"bindingType": "prototypeProperty"
}
},
"28": {
"18": {
"name": "buildIntervals",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
28,
18
],
[
35,
1
]
],
"doc": null
}
},
"35": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
35,
19
],
[
42,
1
]
],
"doc": null
}
},
"42": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"state"
],
"range": [
[
42,
21
],
[
48,
1
]
],
"doc": null
}
},
"48": {
"13": {
"name": "markRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range",
"properties"
],
"range": [
[
48,
13
],
[
54,
1
]
],
"doc": " Public: Create a marker with the given range. This marker will maintain\nits logical location as the buffer is changed, so if you mark a particular\nword, the marker will remain over that word even if the word's location in\nthe buffer changes.\n\n* range: A {Range} or range-compatible {Array}\n* properties:\n A hash of key-value pairs to associate with the marker. There are also\n reserved property names that have marker-specific meaning:\n :reversed -\n Creates the marker in a reversed orientation. Defaults to false.\n :persistent -\n Whether to include this marker when serializing the buffer. Defaults\n to true.\n :invalidate -\n Determines the rules by which changes to the buffer *invalidate* the\n marker. Defaults to 'overlap', but can be any of the following\n strategies, in order of fragility:\n * 'never':\n The marker is never marked as invalid. This is a good choice for\n markers representing selections in an editor.\n * 'surround':\n The marker is invalidated by changes that completely surround it.\n * 'overlap':\n The marker is invalidated by changes that surround the start or\n end of the marker. This is the default.\n * 'inside':\n The marker is invalidated by changes that extend into the\n inside of the marker. Changes that end at the marker's start or\n start at the marker's end do not invalidate the marker.\n * 'touch':\n The marker is invalidated by a change that touches the marked\n region in any way, including changes that end at the marker's\n start or start at the marker's end. This is the most fragile\n strategy.\n\nReturns a {Marker}. "
}
},
"54": {
"16": {
"name": "markPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position",
"properties"
],
"range": [
[
54,
16
],
[
57,
1
]
],
"doc": " Public: Create a marker at the given position with no tail.\n\n:position - {Point} or point-compatible {Array}\n:properties - This is the same as the `properties` parameter in {::markRange}\n\nReturns a {Marker}. "
}
},
"57": {
"13": {
"name": "getMarker",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"id"
],
"range": [
[
57,
13
],
[
60,
1
]
],
"doc": " Public: Get an existing marker by its id.\n\nReturns a {Marker}. "
}
},
"60": {
"14": {
"name": "getMarkers",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
60,
14
],
[
63,
1
]
],
"doc": " Public: Get all existing markers on the buffer.\n\nReturns an {Array} of {Marker}s. "
}
},
"63": {
"18": {
"name": "getMarkerCount",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
63,
18
],
[
66,
1
]
],
"doc": " Public: Get the number of markers in the buffer.\n\nReturns a {Number}. "
}
},
"66": {
"15": {
"name": "findMarkers",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
66,
15
],
[
113,
1
]
],
"doc": " Public: Find markers conforming to the given parameters.\n\n:params -\nA hash of key-value pairs constraining the set of returned markers. You\ncan query against custom marker properties by listing the desired\nkey-value pairs here. In addition, the following keys are reserved and\nhave special semantics:\n* 'startPosition': Only include markers that start at the given {Point}.\n* 'endPosition': Only include markers that end at the given {Point}.\n* 'containsPoint': Only include markers that contain the given {Point}, inclusive.\n* 'containsRange': Only include markers that contain the given {Range}, inclusive.\n* 'startRow': Only include markers that start at the given row {Number}.\n* 'endRow': Only include markers that end at the given row {Number}.\n* 'intersectsRow': Only include markers that intersect the given row {Number}.\n\nFinds markers that conform to all of the given parameters. Markers are\nsorted based on their position in the buffer. If two markers start at the\nsame position, the larger marker comes first.\n\nReturns an {Array} of {Marker}s. "
}
},
"113": {
"16": {
"name": "createMarker",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
113,
16
],
[
121,
1
]
],
"doc": null
}
},
"121": {
"16": {
"name": "removeMarker",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"id"
],
"range": [
[
121,
16
],
[
124,
1
]
],
"doc": null
}
},
"124": {
"21": {
"name": "recordMarkerPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
124,
21
],
[
128,
1
]
],
"doc": null
}
},
"128": {
"22": {
"name": "handleBufferChange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
128,
22
],
[
131,
1
]
],
"doc": null
}
},
"131": {
"16": {
"name": "applyPatches",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"markerPatches",
"textChanged"
],
"range": [
[
131,
16
],
[
135,
1
]
],
"doc": null
}
},
"135": {
"21": {
"name": "pauseChangeEvents",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
135,
21
],
[
138,
1
]
],
"doc": null
}
},
"138": {
"22": {
"name": "resumeChangeEvents",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
138,
22
],
[
139,
62
]
],
"doc": null
}
}
},
"exports": 10
},
"./src/marker-patch.coffee": {
"objects": {
"0": {
"1": {
"type": "import",
"range": [
[
0,
1
],
[
0,
5
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "clone",
"exportsProperty": "clone"
}
},
"1": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
1,
15
],
[
1,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"2": {
"8": {
"name": "Range",
"type": "import",
"range": [
[
2,
8
],
[
2,
24
]
],
"bindingType": "variable",
"path": "./range"
}
},
"8": {
"0": {
"type": "class",
"name": "MarkerPatch",
"bindingType": "exports",
"classProperties": [],
"prototypeProperties": [
[
11,
19
],
[
18,
21
],
[
23,
10
],
[
26,
11
]
],
"doc": " Private: Represents changes to a {Marker}. These patches are thrown away for standalone\nmarker updates, but we reify marker changes into objects so they can be stored\nwithin {BufferPatch}es and {Transaction}s. ",
"range": [
[
8,
0
],
[
27,
45
]
]
}
},
"11": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
11,
19
],
[
18,
1
]
],
"doc": null
}
},
"18": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
18,
21
],
[
23,
1
]
],
"doc": null
}
},
"23": {
"10": {
"name": "invert",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
23,
10
],
[
26,
1
]
],
"doc": null
}
},
"26": {
"11": {
"name": "applyTo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"buffer"
],
"range": [
[
26,
11
],
[
27,
45
]
],
"doc": null
}
}
},
"exports": 8
},
"./src/marker.coffee": {
"objects": {
"0": {
"1": {
"type": "import",
"range": [
[
0,
1
],
[
0,
6
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "extend",
"exportsProperty": "extend"
},
"9": {
"type": "import",
"range": [
[
0,
9
],
[
0,
15
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "isEqual",
"exportsProperty": "isEqual"
},
"18": {
"type": "import",
"range": [
[
0,
18
],
[
0,
21
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "omit",
"exportsProperty": "omit"
},
"24": {
"type": "import",
"range": [
[
0,
24
],
[
0,
27
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "pick",
"exportsProperty": "pick"
},
"30": {
"type": "import",
"range": [
[
0,
30
],
[
0,
33
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "size",
"exportsProperty": "size"
}
},
"1": {
"1": {
"type": "import",
"range": [
[
1,
1
],
[
1,
7
]
],
"bindingType": "variable",
"module": "emissary@1.x",
"name": "Emitter",
"exportsProperty": "Emitter"
}
},
"2": {
"7": {
"name": "Grim",
"type": "import",
"range": [
[
2,
7
],
[
2,
20
]
],
"bindingType": "variable",
"module": "grim@0.11.0"
}
},
"3": {
"12": {
"name": "Delegator",
"type": "import",
"range": [
[
3,
12
],
[
3,
29
]
],
"bindingType": "variable",
"module": "delegato@1.x"
}
},
"4": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
4,
15
],
[
4,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"5": {
"14": {
"name": "MarkerPatch",
"type": "import",
"range": [
[
5,
14
],
[
5,
37
]
],
"bindingType": "variable",
"path": "./marker-patch"
}
},
"6": {
"8": {
"name": "Point",
"type": "import",
"range": [
[
6,
8
],
[
6,
24
]
],
"bindingType": "variable",
"path": "./point"
}
},
"7": {
"8": {
"name": "Range",
"type": "import",
"range": [
[
7,
8
],
[
7,
24
]
],
"bindingType": "variable",
"path": "./range"
}
},
"9": {
"13": {
"type": "primitive",
"range": [
[
9,
13
],
[
9,
62
]
]
}
},
"59": {
"0": {
"type": "class",
"name": "Marker",
"bindingType": "exports",
"classProperties": [
[
64,
18
],
[
73,
27
]
],
"prototypeProperties": [
[
111,
19
],
[
116,
21
],
[
121,
12
],
[
130,
12
],
[
137,
19
],
[
148,
19
],
[
173,
19
],
[
188,
19
],
[
210,
20
],
[
218,
18
],
[
229,
13
],
[
241,
13
],
[
249,
14
],
[
253,
11
],
[
259,
11
],
[
265,
15
],
[
270,
11
],
[
278,
27
],
[
282,
17
],
[
287,
17
],
[
293,
17
],
[
298,
17
],
[
303,
8
],
[
308,
11
],
[
314,
17
],
[
320,
11
],
[
324,
21
],
[
329,
17
],
[
336,
16
],
[
357,
12
],
[
362,
10
],
[
372,
22
],
[
419,
14
],
[
430,
14
],
[
477,
19
]
],
"doc": " Public: Reprents a buffer annotation that remains logically stationary even\nas the buffer changes. This is used to represent cursors, folds, snippet\ntargets, misspelled words, and anything else that needs to track a logical\nlocation in the buffer over time.\n\nHead and Tail:\nMarkers always have a *head* and sometimes have a *tail*. If you think of a\nmarker as an editor selection, the tail is the part that's stationary and the\nhead is the part that moves when the mouse is moved. A marker without a tail\nalways reports an empty range at the head position. A marker with a head position\ngreater than the tail is in a \"normal\" orientation. If the head precedes the\ntail the marker is in a \"reversed\" orientation.\n\nValidity:\nMarkers are considered *valid* when they are first created. Depending on the\ninvalidation strategy you choose, certain changes to the buffer can cause a\nmarker to become invalid, for example if the text surrounding the marker is\ndeleted. See {TextBuffer::markRange} for invalidation strategies.\n\nChange events:\nWhen markers change in position for any reason, the emit a 'changed' event with\nthe following properties:\n\n* oldHeadPosition:\n A {Point} representing the former head position\n* newHeadPosition:\n A {Point} representing the new head position\n* oldTailPosition:\n A {Point} representing the former tail position\n* newTailPosition:\n A {Point} representing the new tail position\n* wasValid:\n A {Boolean} indicating whether the marker was valid before the change\n* isValid:\n A {Boolean} indicating whether the marker is now valid\n* hadTail:\n A {Boolean} indicating whether the marker had a tail before the change\n* hasTail:\n A {Boolean} indicating whether the marker now has a tail\n* oldProperties:\n An {Object} containing the marker's custom properties before the change.\n* newProperties:\n An {Object} containing the marker's custom properties after the change.\n* textChanged:\n A {Boolean} indicating whether this change was caused by a textual change\n to the buffer or whether the marker was manipulated directly via its public\n API. ",
"range": [
[
59,
0
],
[
478,
60
]
]
}
},
"64": {
"18": {
"name": "extractParams",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"inputParams"
],
"range": [
[
64,
18
],
[
73,
1
]
],
"doc": null
}
},
"73": {
"27": {
"name": "handleDeprecatedParams",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
73,
27
],
[
94,
1
]
],
"doc": null
}
},
"111": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
111,
19
],
[
116,
1
]
],
"doc": null
}
},
"116": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"state"
],
"range": [
[
116,
21
],
[
121,
1
]
],
"doc": null
}
},
"121": {
"12": {
"name": "getRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
121,
12
],
[
130,
1
]
],
"doc": " Public: Returns the current {Range} of the marker. The range is immutable. "
}
},
"130": {
"12": {
"name": "setRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range",
"properties"
],
"range": [
[
130,
12
],
[
137,
1
]
],
"doc": " Public: Sets the range of the marker.\n\nrange - A {Range} or range-compatible {Array}. The range will be clipped\n before it is assigned.\nproperties - An optional hash of properties to associate with the marker.\n:reversed - If true, the marker will to be in a reversed orientation. "
}
},
"137": {
"19": {
"name": "getHeadPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
137,
19
],
[
148,
1
]
],
"doc": " Public: Returns a {Point} representing the marker's current head position. "
}
},
"148": {
"19": {
"name": "setHeadPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position",
"properties"
],
"range": [
[
148,
19
],
[
173,
1
]
],
"doc": " Public: Sets the head position of the marker.\n\nposition - A {Point} or point-compatible {Array}. The position will be\n clipped before it is assigned.\nproperties - An optional hash of properties to associate with the marker. "
}
},
"173": {
"19": {
"name": "getTailPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
173,
19
],
[
188,
1
]
],
"doc": " Public: Returns a {Point} representing the marker's current tail position.\nIf the marker has no tail, the head position will be returned instead. "
}
},
"188": {
"19": {
"name": "setTailPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position",
"properties"
],
"range": [
[
188,
19
],
[
210,
1
]
],
"doc": " Public: Sets the head position of the marker. If the marker doesn't have a\ntail, it will after calling this method.\n\nposition - A {Point} or point-compatible {Array}. The position will be\n clipped before it is assigned.\nproperties - An optional hash of properties to associate with the marker. "
}
},
"210": {
"20": {
"name": "getStartPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
210,
20
],
[
218,
1
]
],
"doc": " Public: Returns a {Point} representing the start position of the marker,\nwhich could be the head or tail position, depending on its orientation. "
}
},
"218": {
"18": {
"name": "getEndPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
218,
18
],
[
229,
1
]
],
"doc": " Public: Returns a {Point} representing the end position of the marker,\nwhich could be the head or tail position, depending on its orientation. "
}
},
"229": {
"13": {
"name": "clearTail",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"properties"
],
"range": [
[
229,
13
],
[
241,
1
]
],
"doc": " Public: Removes the marker's tail. After calling the marker's head position\nwill be reported as its current tail position until the tail is planted\nagain.\n\nproperties - An optional hash of properties to associate with the marker. "
}
},
"241": {
"13": {
"name": "plantTail",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"properties"
],
"range": [
[
241,
13
],
[
249,
1
]
],
"doc": " Public: Plants the marker's tail at the current head position. After calling\nthe marker's tail position will be its head position at the time of the\ncall, regardless of where the marker's head is moved.\n\nproperties - An optional hash of properties to associate with the marker. "
}
},
"249": {
"14": {
"name": "isReversed",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
249,
14
],
[
253,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether the head precedes the tail. "
}
},
"253": {
"11": {
"name": "hasTail",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
253,
11
],
[
259,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether the marker has a tail. "
}
},
"259": {
"11": {
"name": "isValid",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
259,
11
],
[
265,
1
]
],
"doc": " Public: Is the marker valid?\n\nReturns a {Boolean}. "
}
},
"265": {
"15": {
"name": "isDestroyed",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
265,
15
],
[
270,
1
]
],
"doc": " Public: Is the marker destroyed?\n\nReturns a {Boolean}. "
}
},
"270": {
"11": {
"name": "isEqual",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
270,
11
],
[
278,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this marker is equivalent to\nanother marker, meaning they have the same range and options. "
}
},
"278": {
"27": {
"name": "getInvalidationStrategy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
278,
27
],
[
282,
1
]
],
"doc": " Public: Get the invalidation strategy for this marker.\n\nValid values include: `never`, `surround`, `overlap`, `inside`, and `touch`.\n\nReturns a {String}. "
}
},
"282": {
"17": {
"name": "getAttributes",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
282,
17
],
[
287,
1
]
],
"doc": null
}
},
"287": {
"17": {
"name": "setAttributes",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"args"
],
"range": [
[
287,
17
],
[
293,
1
]
],
"doc": null
}
},
"293": {
"17": {
"name": "getProperties",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
293,
17
],
[
298,
1
]
],
"doc": " Public: Returns an {Object} containing any custom properties associated with\nthe marker. "
}
},
"298": {
"17": {
"name": "setProperties",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"properties"
],
"range": [
[
298,
17
],
[
303,
1
]
],
"doc": " Public: Merges an {Object} containing new properties into the marker's\nexisting properties. "
}
},
"303": {
"8": {
"name": "copy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
303,
8
],
[
308,
1
]
],
"doc": " Public: Creates and returns a new {Marker} with the same properties as this\nmarker. "
}
},
"308": {
"11": {
"name": "destroy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
308,
11
],
[
314,
1
]
],
"doc": " Public: Destroys the marker, causing it to emit the 'destroyed' event. Once\ndestroyed, a marker cannot be restored by undo/redo operations. "
}
},
"314": {
"17": {
"name": "extractParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
314,
17
],
[
320,
1
]
],
"doc": null
}
},
"320": {
"11": {
"name": "compare",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
320,
11
],
[
324,
1
]
],
"doc": " Public: Compares this marker to another based on their ranges. "
}
},
"324": {
"21": {
"name": "matchesAttributes",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"args"
],
"range": [
[
324,
21
],
[
329,
1
]
],
"doc": null
}
},
"329": {
"17": {
"name": "matchesParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
329,
17
],
[
336,
1
]
],
"doc": null
}
},
"336": {
"16": {
"name": "matchesParam",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"key",
"value"
],
"range": [
[
336,
16
],
[
357,
1
]
],
"doc": null
}
},
"357": {
"12": {
"name": "toParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"omitId"
],
"range": [
[
357,
12
],
[
362,
1
]
],
"doc": null
}
},
"362": {
"10": {
"name": "update",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
362,
10
],
[
372,
1
]
],
"doc": null
}
},
"372": {
"22": {
"name": "handleBufferChange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
372,
22
],
[
419,
1
]
],
"doc": null
}
},
"419": {
"14": {
"name": "buildPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"newParams"
],
"range": [
[
419,
14
],
[
430,
1
]
],
"doc": null
}
},
"430": {
"14": {
"name": "applyPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch",
"textChanged"
],
"range": [
[
430,
14
],
[
477,
1
]
],
"doc": null
}
},
"477": {
"19": {
"name": "updateIntervals",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
477,
19
],
[
478,
60
]
],
"doc": null
}
}
},
"exports": 59
},
"./src/point.coffee": {
"objects": {
"11": {
"0": {
"type": "class",
"name": "Point",
"bindingType": "exports",
"classProperties": [
[
24,
15
],
[
36,
8
]
],
"prototypeProperties": [
[
47,
8
],
[
51,
10
],
[
56,
13
],
[
60,
7
],
[
70,
11
],
[
86,
11
],
[
101,
11
],
[
108,
14
],
[
113,
21
],
[
118,
17
],
[
123,
24
],
[
127,
11
],
[
131,
13
],
[
135,
12
]
],
"doc": " Public: Represents a point in a buffer in row/column coordinates.\n\nEvery public method that takes a point also accepts a *point-compatible*\n{Array}. This means a 2-element array containing {Number}s representing the\nrow and column. So the following are equivalent:\n\n```coffee\nnew Point(1, 2)\n[1, 2]\n``` ",
"range": [
[
11,
0
],
[
136,
27
]
]
}
},
"24": {
"15": {
"name": "fromObject",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"object",
"copy"
],
"range": [
[
24,
15
],
[
36,
1
]
],
"doc": " Public: Convert any point-compatible object to a {Point}.\n\n* object:\n This can be an object that's already a {Point}, in which case it's\n simply returned, or an array containing two {Number}s representing the\n row and column.\n\n* copy:\n An optional boolean indicating whether to force the copying of objects\n that are already points.\n\nReturns: A {Point} based on the given object. "
}
},
"36": {
"8": {
"name": "min",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"point1",
"point2"
],
"range": [
[
36,
8
],
[
44,
1
]
],
"doc": " Public: Returns the given point that is earlier in the buffer. "
}
},
"47": {
"8": {
"name": "copy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
47,
8
],
[
51,
1
]
],
"doc": " Public: Creates and returns a new {Marker} with the same properties as this\nmarker. "
}
},
"51": {
"10": {
"name": "freeze",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
51,
10
],
[
56,
1
]
],
"doc": " Public: Makes this point immutable and returns itself. "
}
},
"56": {
"13": {
"name": "translate",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"delta"
],
"range": [
[
56,
13
],
[
60,
1
]
],
"doc": " Public: Return a new {Point} based on shifting this point by the given delta,\nwhich is represented by another {Point}. "
}
},
"60": {
"7": {
"name": "add",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
60,
7
],
[
70,
1
]
],
"doc": null
}
},
"70": {
"11": {
"name": "splitAt",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"column"
],
"range": [
[
70,
11
],
[
86,
1
]
],
"doc": null
}
},
"86": {
"11": {
"name": "compare",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
86,
11
],
[
101,
1
]
],
"doc": " Public: Compares this marker to another based on their ranges. "
}
},
"101": {
"11": {
"name": "isEqual",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
101,
11
],
[
108,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this marker is equivalent to\nanother marker, meaning they have the same range and options. "
}
},
"108": {
"14": {
"name": "isLessThan",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
108,
14
],
[
113,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this point precedes the given\n{Point} or point-compatible {Array}. "
}
},
"113": {
"21": {
"name": "isLessThanOrEqual",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
113,
21
],
[
118,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this point precedes or is\nequal to the given {Point} or point-compatible {Array}. "
}
},
"118": {
"17": {
"name": "isGreaterThan",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
118,
17
],
[
123,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this point follows the given\n{Point} or point-compatible {Array}. "
}
},
"123": {
"24": {
"name": "isGreaterThanOrEqual",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
123,
24
],
[
127,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this point follows or is\nequal to the given {Point} or point-compatible {Array}. "
}
},
"127": {
"11": {
"name": "toArray",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
127,
11
],
[
131,
1
]
],
"doc": " Public: Returns an array of this point's row and column. "
}
},
"131": {
"13": {
"name": "serialize",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
131,
13
],
[
135,
1
]
],
"doc": " Public: Returns an array of this point's row and column. "
}
},
"135": {
"12": {
"name": "toString",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
135,
12
],
[
136,
27
]
],
"doc": " Public: Returns a string representation of the point. "
}
}
},
"exports": 11
},
"./src/range.coffee": {
"objects": {
"0": {
"7": {
"name": "Grim",
"type": "import",
"range": [
[
0,
7
],
[
0,
20
]
],
"bindingType": "variable",
"module": "grim@0.11.0"
}
},
"1": {
"8": {
"name": "Point",
"type": "import",
"range": [
[
1,
8
],
[
1,
24
]
],
"bindingType": "variable",
"path": "./point"
}
},
"2": {
"1": {
"type": "import",
"range": [
[
2,
1
],
[
2,
12
]
],
"bindingType": "variable",
"path": "./helpers",
"name": "newlineRegex",
"exportsProperty": "newlineRegex"
}
},
"16": {
"0": {
"type": "class",
"name": "Range",
"bindingType": "exports",
"classProperties": [
[
18,
16
],
[
32,
15
],
[
50,
13
],
[
79,
23
]
],
"prototypeProperties": [
[
96,
13
],
[
100,
8
],
[
105,
10
],
[
112,
11
],
[
125,
11
],
[
134,
16
],
[
139,
18
],
[
142,
7
],
[
145,
13
],
[
149,
18
],
[
162,
17
],
[
173,
17
],
[
187,
17
],
[
192,
22
],
[
197,
9
],
[
205,
11
],
[
208,
11
],
[
219,
15
],
[
223,
11
],
[
227,
12
]
],
"doc": " Public: Represents a region in a buffer in row/column coordinates.\n\nEvery public method that takes a range also accepts a *range-compatible*\n{Array}. This means a 2-element array containing {Point}s or point-compatible\narrays. So the following are equivalent:\n\n```coffee\nnew Range(new Point(0, 1), new Point(2, 3))\nnew Range([0, 1], [2, 3])\n[[0, 1], [2, 3]]\n``` ",
"range": [
[
16,
0
],
[
228,
27
]
]
}
},
"18": {
"16": {
"name": "deserialize",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"array"
],
"range": [
[
18,
16
],
[
32,
1
]
],
"doc": " Public: Call this with the result of {Range::serialize} to construct a new Range. "
}
},
"32": {
"15": {
"name": "fromObject",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"object",
"copy"
],
"range": [
[
32,
15
],
[
50,
1
]
],
"doc": " Public: Convert any point-compatible object to a {Point}.\n\n* object:\n This can be an object that's already a {Point}, in which case it's\n simply returned, or an array containing two {Number}s representing the\n row and column.\n\n* copy:\n An optional boolean indicating whether to force the copying of objects\n that are already points.\n\nReturns: A {Point} based on the given object. "
}
},
"50": {
"13": {
"name": "fromText",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"args"
],
"range": [
[
50,
13
],
[
79,
1
]
],
"doc": null
}
},
"79": {
"23": {
"name": "fromPointWithDelta",
"bindingType": "classProperty",
"type": "function",
"paramNames": [
"startPoint",
"rowDelta",
"columnDelta"
],
"range": [
[
79,
23
],
[
84,
1
]
],
"doc": " Public: Returns a {Range} that starts at the given point and ends at the\nstart point plus the given row and column deltas.\n\n* startPoint:\n A {Point} or point-compatible {Array}\n* rowDelta:\n A {Number} indicating how many rows to add to the start point to get the\n end point.\n* columnDelta:\n A {Number} indicating how many rows to columns to the start point to get\n the end point.\n\nReturns a {Range} "
}
},
"96": {
"13": {
"name": "serialize",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
96,
13
],
[
100,
1
]
],
"doc": " Public: Returns an array of this point's row and column. "
}
},
"100": {
"8": {
"name": "copy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
100,
8
],
[
105,
1
]
],
"doc": " Public: Creates and returns a new {Marker} with the same properties as this\nmarker. "
}
},
"105": {
"10": {
"name": "freeze",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
105,
10
],
[
112,
1
]
],
"doc": " Public: Makes this point immutable and returns itself. "
}
},
"112": {
"11": {
"name": "isEqual",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
112,
11
],
[
125,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this marker is equivalent to\nanother marker, meaning they have the same range and options. "
}
},
"125": {
"11": {
"name": "compare",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
125,
11
],
[
134,
1
]
],
"doc": " Public: Compares this marker to another based on their ranges. "
}
},
"134": {
"16": {
"name": "isSingleLine",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
134,
16
],
[
139,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range starts and ends on\nthe same row. "
}
},
"139": {
"18": {
"name": "coversSameRows",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"other"
],
"range": [
[
139,
18
],
[
142,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range starts and ends on\nthe same row as the argument. "
}
},
"142": {
"7": {
"name": "add",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"delta"
],
"range": [
[
142,
7
],
[
145,
1
]
],
"doc": null
}
},
"145": {
"13": {
"name": "translate",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"startPoint",
"endPoint"
],
"range": [
[
145,
13
],
[
149,
1
]
],
"doc": " Public: Return a new {Point} based on shifting this point by the given delta,\nwhich is represented by another {Point}. "
}
},
"149": {
"18": {
"name": "intersectsWith",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"otherRange"
],
"range": [
[
149,
18
],
[
162,
1
]
],
"doc": " Public: Determines whether this range intersects with the argument. "
}
},
"162": {
"17": {
"name": "containsRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"otherRange",
"exclusive"
],
"range": [
[
162,
17
],
[
173,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range contains the given\nrange.\n\n* otherRange: A {Range} or range-compatible {Array}\n* exclusive:\nA boolean value including that the containment should be exclusive of\nendpoints. Defaults to false. "
}
},
"173": {
"17": {
"name": "containsPoint",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"point",
"exclusive"
],
"range": [
[
173,
17
],
[
187,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range contains the given\npoint.\n\n* point: A {Point} or point-compatible {Array}\n* exclusive:\nA boolean value including that the containment should be exclusive of\nendpoints. Defaults to false. "
}
},
"187": {
"17": {
"name": "intersectsRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
187,
17
],
[
192,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range intersects the\ngiven row {Number}. "
}
},
"192": {
"22": {
"name": "intersectsRowRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"startRow",
"endRow"
],
"range": [
[
192,
22
],
[
197,
1
]
],
"doc": " Public: Returns a {Boolean} indicating whether this range intersects the\nrow range indicated by the given startRow and endRow {Number}s. "
}
},
"197": {
"9": {
"name": "union",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"otherRange"
],
"range": [
[
197,
9
],
[
205,
1
]
],
"doc": " Public: Returns a new range that contains this range and the given range. "
}
},
"205": {
"11": {
"name": "isEmpty",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
205,
11
],
[
208,
1
]
],
"doc": " Public: Is the start position of this range equal to the end position?\n\nReturns a {Boolean}. "
}
},
"208": {
"11": {
"name": "toDelta",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
208,
11
],
[
219,
1
]
],
"doc": null
}
},
"219": {
"15": {
"name": "getRowCount",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
219,
15
],
[
223,
1
]
],
"doc": " Public: Get the number of rows in this range.\n\nReturns a {Number}. "
}
},
"223": {
"11": {
"name": "getRows",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
223,
11
],
[
227,
1
]
],
"doc": " Public: Returns an array of all rows in the range. "
}
},
"227": {
"12": {
"name": "toString",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
227,
12
],
[
228,
27
]
],
"doc": " Public: Returns a string representation of the point. "
}
}
},
"exports": 16
},
"./src/text-buffer.coffee": {
"objects": {
"0": {
"4": {
"name": "_",
"type": "import",
"range": [
[
0,
4
],
[
0,
28
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x"
}
},
"1": {
"12": {
"name": "Delegator",
"type": "import",
"range": [
[
1,
12
],
[
1,
29
]
],
"bindingType": "variable",
"module": "delegato@1.x"
}
},
"2": {
"7": {
"name": "Grim",
"type": "import",
"range": [
[
2,
7
],
[
2,
20
]
],
"bindingType": "variable",
"module": "grim@0.11.0"
}
},
"3": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
3,
15
],
[
3,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"4": {
"1": {
"type": "import",
"range": [
[
4,
1
],
[
4,
7
]
],
"bindingType": "variable",
"module": "emissary@1.x",
"name": "Emitter",
"exportsProperty": "Emitter"
},
"10": {
"type": "import",
"range": [
[
4,
10
],
[
4,
19
]
],
"bindingType": "variable",
"module": "emissary@1.x",
"name": "Subscriber",
"exportsProperty": "Subscriber"
}
},
"5": {
"1": {
"type": "import",
"range": [
[
5,
1
],
[
5,
4
]
],
"bindingType": "variable",
"module": "pathwatcher@^2.0.2",
"name": "File",
"exportsProperty": "File"
}
},
"6": {
"15": {
"name": "SpanSkipList",
"type": "import",
"range": [
[
6,
15
],
[
6,
38
]
],
"bindingType": "variable",
"module": "span-skip-list@~0.1.1"
}
},
"7": {
"7": {
"name": "diff",
"type": "import",
"range": [
[
7,
7
],
[
7,
20
]
],
"bindingType": "variable",
"module": "diff@git://github.com/benogle/jsdiff.git"
}
},
"8": {
"4": {
"name": "Q",
"type": "import",
"range": [
[
8,
4
],
[
8,
14
]
],
"bindingType": "variable",
"module": "q@~1.0.1"
}
},
"9": {
"8": {
"name": "Point",
"type": "import",
"range": [
[
9,
8
],
[
9,
24
]
],
"bindingType": "variable",
"path": "./point"
}
},
"10": {
"8": {
"name": "Range",
"type": "import",
"range": [
[
10,
8
],
[
10,
24
]
],
"bindingType": "variable",
"path": "./range"
}
},
"11": {
"10": {
"name": "History",
"type": "import",
"range": [
[
11,
10
],
[
11,
28
]
],
"bindingType": "variable",
"path": "./history"
}
},
"12": {
"16": {
"name": "MarkerManager",
"type": "import",
"range": [
[
12,
16
],
[
12,
41
]
],
"bindingType": "variable",
"path": "./marker-manager"
}
},
"13": {
"14": {
"name": "BufferPatch",
"type": "import",
"range": [
[
13,
14
],
[
13,
37
]
],
"bindingType": "variable",
"path": "./buffer-patch"
}
},
"14": {
"1": {
"type": "import",
"range": [
[
14,
1
],
[
14,
11
]
],
"bindingType": "variable",
"path": "./helpers",
"name": "spliceArray",
"exportsProperty": "spliceArray"
},
"14": {
"type": "import",
"range": [
[
14,
14
],
[
14,
25
]
],
"bindingType": "variable",
"path": "./helpers",
"name": "newlineRegex",
"exportsProperty": "newlineRegex"
}
},
"68": {
"0": {
"type": "class",
"name": "TextBuffer",
"bindingType": "exports",
"classProperties": [
[
69,
10
],
[
70,
10
],
[
71,
17
]
],
"prototypeProperties": [
[
78,
14
],
[
79,
24
],
[
80,
26
],
[
81,
22
],
[
82,
12
],
[
83,
8
],
[
84,
12
],
[
112,
21
],
[
119,
19
],
[
130,
11
],
[
142,
12
],
[
148,
11
],
[
154,
16
],
[
160,
14
],
[
168,
14
],
[
175,
15
],
[
187,
20
],
[
196,
20
],
[
204,
11
],
[
211,
18
],
[
260,
18
],
[
273,
10
],
[
281,
10
],
[
289,
10
],
[
297,
13
],
[
309,
14
],
[
337,
14
],
[
347,
14
],
[
406,
18
],
[
436,
13
],
[
454,
16
],
[
471,
20
],
[
478,
18
],
[
485,
12
],
[
496,
15
],
[
515,
29
],
[
532,
29
],
[
545,
24
],
[
548,
12
],
[
552,
8
],
[
555,
17
],
[
565,
20
],
[
569,
11
],
[
577,
11
],
[
579,
15
],
[
581,
14
],
[
583,
10
],
[
587,
11
],
[
592,
19
],
[
624,
22
],
[
629,
10
],
[
636,
32
],
[
640,
28
],
[
650,
15
],
[
656,
11
],
[
662,
10
],
[
668,
11
],
[
682,
18
],
[
687,
8
],
[
693,
10
],
[
710,
14
],
[
724,
16
],
[
726,
17
],
[
736,
27
],
[
774,
8
],
[
792,
17
],
[
804,
11
],
[
830,
15
],
[
881,
24
],
[
889,
14
],
[
897,
23
],
[
910,
19
],
[
918,
16
],
[
926,
10
],
[
930,
32
],
[
933,
26
],
[
942,
29
],
[
947,
12
],
[
956,
8
],
[
959,
8
],
[
969,
12
],
[
977,
20
],
[
983,
21
],
[
987,
20
],
[
990,
18
],
[
1029,
13
],
[
1037,
16
],
[
1042,
13
],
[
1047,
14
],
[
1069,
15
],
[
1074,
18
]
],
"doc": " Public: A mutable text container with undo/redo support and the ability to\nannotate logical regions in the text.\n\n‘#‘# Events\n\n* `changed` -\n Emitted synchronously whenever the buffer changes. Binding a slow handler\n to this event has the potential to destroy typing performance. Consider\n using `contents-modified` instead and aim for extremely fast performance\n (< 2 ms) if you must bind to it. Your handler will be called with an\n object containing the following keys.\n * `oldRange` - The {Range} of the old text\n * `newRange` - The {Range} of the new text\n * `oldText` - A {String} containing the text that was replaced\n * `newText` - A {String} containing the text that was inserted\n\n* `markers-updated` -\n Emitted synchronously when the `changed` events of all markers have been\n fired for a change. The order of events is as follows:\n * The text of the buffer is changed\n * All markers are updated accordingly, but their `changed` events are not\n emited\n * The `changed` event is emitted\n * The `changed` events of all updated markers are emitted\n * The `markers-updated` event is emitted.\n\n* `contents-modified` -\n Emitted asynchronously 300ms (or `TextBuffer::stoppedChangingDelay`)\n after the last buffer change. This is a good place to handle changes to\n the buffer without compromising typing performance.\n\n* `modified-status-changed` -\n Emitted with a {Boolean} when the result of {::isModified} changes.\n\n* `contents-conflicted` -\n Emitted when the buffer's underlying file changes on disk at a moment\n when the result of {::isModified} is true.\n\n* `will-reload` -\n Emitted before the in-memory contents of the buffer are refreshed from\n the contents of the file on disk.\n\n* `reloaded` -\n Emitted after the in-memory contents of the buffer are refreshed from\n the contents of the file on disk.\n\n* `will-be-saved` - Emitted before the buffer is saved to disk.\n\n* `saved` - Emitted after the buffer is saved to disk.\n\n* `destroyed` - Emitted when the buffer is destroyed. ",
"range": [
[
68,
0
],
[
1074,
46
]
]
}
},
"69": {
"10": {
"name": "Point",
"type": "primitive",
"range": [
[
69,
10
],
[
69,
14
]
],
"bindingType": "classProperty"
}
},
"70": {
"10": {
"name": "Range",
"type": "primitive",
"range": [
[
70,
10
],
[
70,
14
]
],
"bindingType": "classProperty"
}
},
"71": {
"17": {
"name": "newlineRegex",
"type": "primitive",
"range": [
[
71,
17
],
[
71,
28
]
],
"bindingType": "classProperty"
}
},
"78": {
"14": {
"name": "cachedText",
"type": "primitive",
"range": [
[
78,
14
],
[
78,
17
]
],
"bindingType": "prototypeProperty"
}
},
"79": {
"24": {
"name": "stoppedChangingDelay",
"type": "primitive",
"range": [
[
79,
24
],
[
79,
26
]
],
"bindingType": "prototypeProperty"
}
},
"80": {
"26": {
"name": "stoppedChangingTimeout",
"type": "primitive",
"range": [
[
80,
26
],
[
80,
29
]
],
"bindingType": "prototypeProperty"
}
},
"81": {
"22": {
"name": "cachedDiskContents",
"type": "primitive",
"range": [
[
81,
22
],
[
81,
25
]
],
"bindingType": "prototypeProperty"
}
},
"82": {
"12": {
"name": "conflict",
"type": "primitive",
"range": [
[
82,
12
],
[
82,
16
]
],
"bindingType": "prototypeProperty"
}
},
"83": {
"8": {
"name": "file",
"type": "primitive",
"range": [
[
83,
8
],
[
83,
11
]
],
"bindingType": "prototypeProperty"
}
},
"84": {
"12": {
"name": "refcount",
"type": "primitive",
"range": [
[
84,
12
],
[
84,
12
]
],
"bindingType": "prototypeProperty"
}
},
"112": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
112,
21
],
[
119,
1
]
],
"doc": null
}
},
"119": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
119,
19
],
[
130,
1
]
],
"doc": null
}
},
"130": {
"11": {
"name": "getText",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
130,
11
],
[
142,
1
]
],
"doc": " Public: Get the entire text of the buffer.\n\nReturns a {String}. "
}
},
"142": {
"12": {
"name": "getLines",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
142,
12
],
[
148,
1
]
],
"doc": " Public: Get the text of all lines in the buffer, without their line endings.\n\nReturns an {Array} of {String}s. "
}
},
"148": {
"11": {
"name": "isEmpty",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
148,
11
],
[
154,
1
]
],
"doc": " Public: Is the start position of this range equal to the end position?\n\nReturns a {Boolean}. "
}
},
"154": {
"16": {
"name": "getLineCount",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
154,
16
],
[
160,
1
]
],
"doc": " Public: Get the number of lines in the buffer.\n\nReturns a {Number}. "
}
},
"160": {
"14": {
"name": "getLastRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
160,
14
],
[
168,
1
]
],
"doc": " Public: Get the last 0-indexed row in the buffer.\n\nReturns a {Number}. "
}
},
"168": {
"14": {
"name": "lineForRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
168,
14
],
[
175,
1
]
],
"doc": " Public: Get the text of the line at the given row, without its line ending.\n\nrow - A {Number} representing a 0-indexed row.\n\nReturns a {String}. "
}
},
"175": {
"15": {
"name": "getLastLine",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
175,
15
],
[
187,
1
]
],
"doc": " Public: Get the text of the last line of the buffer, without its line\nending.\n\nReturns a {String}. "
}
},
"187": {
"20": {
"name": "lineEndingForRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
187,
20
],
[
196,
1
]
],
"doc": " Public: Get the line ending for the given 0-indexed row.\n\nrow - A {Number} indicating the row.\n\nThe returned newline is represented as a literal string: `'\\n'`, `'\\r'`,\n`'\\r\\n'`, or `''` for the last line of the buffer, which doesn't end in a\nnewline.\n\nReturns a {String}. "
}
},
"196": {
"20": {
"name": "lineLengthForRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
196,
20
],
[
204,
1
]
],
"doc": " Public: Get the length of the line for the given 0-indexed row, without its\nline ending.\n\nrow - A {Number} indicating the row.\n\nReturns a {Number}. "
}
},
"204": {
"11": {
"name": "setText",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"text"
],
"range": [
[
204,
11
],
[
211,
1
]
],
"doc": " Public: Replace the entire contents of the buffer with the given text.\n\ntext - A {String}\n\nReturns a {Range} spanning the new buffer contents. "
}
},
"211": {
"18": {
"name": "setTextViaDiff",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"text"
],
"range": [
[
211,
18
],
[
260,
1
]
],
"doc": " Public: Replace the current buffer contents by applying a diff based on the\ngiven text.\n\ntext - A {String} containing the new buffer contents. "
}
},
"260": {
"18": {
"name": "setTextInRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range",
"text",
"normalizeLineEndings"
],
"range": [
[
260,
18
],
[
273,
1
]
],
"doc": " Public: Set the text in the given range.\n\nrange - A {Range}.\ntext - A {String}.\n\nReturns the {Range} of the inserted text. "
}
},
"273": {
"10": {
"name": "insert",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position",
"text",
"normalizeLineEndings"
],
"range": [
[
273,
10
],
[
281,
1
]
],
"doc": " Public: Insert text at the given position.\n\nposition - A {Point} representing the insertion location. The position is\n clipped before insertion.\ntext - A {String} representing the text to insert.\n\nReturns the {Range} of the inserted text. "
}
},
"281": {
"10": {
"name": "append",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"text",
"normalizeLineEndings"
],
"range": [
[
281,
10
],
[
289,
1
]
],
"doc": " Public: Append text to the end of the buffer.\n\ntext - A {String} representing the text text to append.\n\nReturns the {Range} of the inserted text "
}
},
"289": {
"10": {
"name": "delete",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range"
],
"range": [
[
289,
10
],
[
297,
1
]
],
"doc": null
}
},
"297": {
"13": {
"name": "deleteRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
297,
13
],
[
309,
1
]
],
"doc": " Public: Delete the line associated with a specified row.\n\nrow - A {Number} representing the 0-indexed row to delete.\n\nReturns the {Range} of the deleted text. "
}
},
"309": {
"14": {
"name": "deleteRows",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"startRow",
"endRow"
],
"range": [
[
309,
14
],
[
337,
1
]
],
"doc": " Public: Delete the lines associated with the specified row range.\n\nstartRow - A {Number} representing the first row to delete.\nendRow - A {Number} representing the last row to delete, inclusive.\n\nIf the row range is out of bounds, it will be clipped. If the startRow is\ngreater than the end row, they will be reordered.\n\nReturns the {Range} of the deleted text. "
}
},
"337": {
"14": {
"name": "buildPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"oldRange",
"newText",
"normalizeLineEndings"
],
"range": [
[
337,
14
],
[
347,
1
]
],
"doc": null
}
},
"347": {
"14": {
"name": "applyPatch",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
null
],
"range": [
[
347,
14
],
[
406,
1
]
],
"doc": null
}
},
"406": {
"18": {
"name": "getTextInRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range"
],
"range": [
[
406,
18
],
[
436,
1
]
],
"doc": " Public: Get the text in a range.\n\nrange - A {Range}\n\nReturns a {String} "
}
},
"436": {
"13": {
"name": "clipRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range"
],
"range": [
[
436,
13
],
[
454,
1
]
],
"doc": " Public: Clip the given range so it starts and ends at valid positions.\n\nFor example, the position [1, 100] is out of bounds if the line at row 1 is\nonly 10 characters long, and it would be clipped to (1, 10).\n\nrange - A {Range} or range-compatible {Array} to clip.\n\nReturns the given {Range} if it is already in bounds, or a new clipped\n{Range} if the given range is out-of-bounds. "
}
},
"454": {
"16": {
"name": "clipPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position"
],
"range": [
[
454,
16
],
[
471,
1
]
],
"doc": " Public: Clip the given point so it is at a valid position in the buffer.\n\nFor example, the position (1, 100) is out of bounds if the line at row 1 is\nonly 10 characters long, and it would be clipped to (1, 10)\n\nposition - A {Point} or point-compatible {Array}.\n\nReturns a new {Point} if the given position is invalid, otherwise returns\nthe given position. "
}
},
"471": {
"20": {
"name": "getFirstPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
471,
20
],
[
478,
1
]
],
"doc": " Public: Get the first position in the buffer, which is always `[0, 0]`.\n\nReturns a {Point}. "
}
},
"478": {
"18": {
"name": "getEndPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
478,
18
],
[
485,
1
]
],
"doc": " Public: Returns a {Point} representing the end position of the marker,\nwhich could be the head or tail position, depending on its orientation. "
}
},
"485": {
"12": {
"name": "getRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
485,
12
],
[
496,
1
]
],
"doc": " Public: Returns the current {Range} of the marker. The range is immutable. "
}
},
"496": {
"15": {
"name": "rangeForRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row",
"includeNewline"
],
"range": [
[
496,
15
],
[
515,
1
]
],
"doc": " Public: Get the range for the given row\n\nrow - A {Number} representing a 0-indexed row.\nincludeNewline - A {Boolean} indicating whether or not to include the\n newline, which results in a range that extends to the start\n of the next line.\n\nReturns a {Range}. "
}
},
"515": {
"29": {
"name": "characterIndexForPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position"
],
"range": [
[
515,
29
],
[
532,
1
]
],
"doc": " Public: Convert a position in the buffer in row/column coordinates to an\nabsolute character offset, inclusive of line ending characters.\n\nThe position is clipped prior to translating.\n\nposition - A {Point}.\n\nReturns a {Number}. "
}
},
"532": {
"29": {
"name": "positionForCharacterIndex",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"offset"
],
"range": [
[
532,
29
],
[
545,
1
]
],
"doc": " Public: Convert an absolute character offset, inclusive of newlines, to a\nposition in the buffer in row/column coordinates.\n\nThe offset is clipped prior to translating.\n\noffset - A {Number}.\n\nReturns a {Point}. "
}
},
"545": {
"24": {
"name": "getMaxCharacterIndex",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
545,
24
],
[
548,
1
]
],
"doc": " Public: Get the length of the buffer in characters.\n\nReturns a {Number}. "
}
},
"548": {
"12": {
"name": "loadSync",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
548,
12
],
[
552,
1
]
],
"doc": null
}
},
"552": {
"8": {
"name": "load",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
552,
8
],
[
555,
1
]
],
"doc": null
}
},
"555": {
"17": {
"name": "finishLoading",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
555,
17
],
[
565,
1
]
],
"doc": null
}
},
"565": {
"20": {
"name": "handleTextChange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"event"
],
"range": [
[
565,
20
],
[
569,
1
]
],
"doc": null
}
},
"569": {
"11": {
"name": "destroy",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
569,
11
],
[
577,
1
]
],
"doc": " Public: Destroys the marker, causing it to emit the 'destroyed' event. Once\ndestroyed, a marker cannot be restored by undo/redo operations. "
}
},
"577": {
"11": {
"name": "isAlive",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
577,
11
],
[
577,
27
]
],
"doc": null
}
},
"579": {
"15": {
"name": "isDestroyed",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
579,
15
],
[
579,
27
]
],
"doc": " Public: Is the marker destroyed?\n\nReturns a {Boolean}. "
}
},
"581": {
"14": {
"name": "isRetained",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
581,
14
],
[
581,
29
]
],
"doc": null
}
},
"583": {
"10": {
"name": "retain",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
583,
10
],
[
587,
1
]
],
"doc": null
}
},
"587": {
"11": {
"name": "release",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
587,
11
],
[
592,
1
]
],
"doc": null
}
},
"592": {
"19": {
"name": "subscribeToFile",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
592,
19
],
[
624,
1
]
],
"doc": null
}
},
"624": {
"22": {
"name": "hasMultipleEditors",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
624,
22
],
[
624,
37
]
],
"doc": null
}
},
"629": {
"10": {
"name": "reload",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
629,
10
],
[
636,
1
]
],
"doc": " Public: Reload the buffer's contents from disk.\n\nSets the buffer's content to the cached disk contents "
}
},
"636": {
"32": {
"name": "updateCachedDiskContentsSync",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
636,
32
],
[
640,
1
]
],
"doc": null
}
},
"640": {
"28": {
"name": "updateCachedDiskContents",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
640,
28
],
[
650,
1
]
],
"doc": null
}
},
"650": {
"15": {
"name": "getBaseName",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
650,
15
],
[
656,
1
]
],
"doc": null
}
},
"656": {
"11": {
"name": "getPath",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
656,
11
],
[
662,
1
]
],
"doc": null
}
},
"662": {
"10": {
"name": "getUri",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
662,
10
],
[
668,
1
]
],
"doc": " Public: Get the path of the associated file.\n\nReturns a {String}. "
}
},
"668": {
"11": {
"name": "setPath",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"filePath"
],
"range": [
[
668,
11
],
[
682,
1
]
],
"doc": " Public: Set the path for the buffer's associated file.\n\nfilePath - A {String} representing the new file path "
}
},
"682": {
"18": {
"name": "getEofPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
682,
18
],
[
687,
1
]
],
"doc": null
}
},
"687": {
"8": {
"name": "save",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
687,
8
],
[
693,
1
]
],
"doc": " Public: Save the buffer. "
}
},
"693": {
"10": {
"name": "saveAs",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"filePath"
],
"range": [
[
693,
10
],
[
710,
1
]
],
"doc": " Public: Save the buffer at a specific path.\n\nfilePath - The path to save at. "
}
},
"710": {
"14": {
"name": "isModified",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
710,
14
],
[
724,
1
]
],
"doc": " Public: Determine if the in-memory contents of the buffer differ from its\ncontents on disk.\n\nIf the buffer is unsaved, always returns `true` unless the buffer is empty.\n\nReturns a {Boolean}. "
}
},
"724": {
"16": {
"name": "isInConflict",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
724,
16
],
[
724,
27
]
],
"doc": " Public: Determine if the in-memory contents of the buffer conflict with the\non-disk contents of its associated file.\n\nReturns a {Boolean}. "
}
},
"726": {
"17": {
"name": "destroyMarker",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"id"
],
"range": [
[
726,
17
],
[
736,
1
]
],
"doc": null
}
},
"736": {
"27": {
"name": "matchesInCharacterRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"startIndex",
"endIndex"
],
"range": [
[
736,
27
],
[
774,
1
]
],
"doc": null
}
},
"774": {
"8": {
"name": "scan",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"iterator"
],
"range": [
[
774,
8
],
[
792,
1
]
],
"doc": " Public: Scan regular expression matches in the entire buffer, calling the\ngiven iterator function on each match.\n\nIf you're programmatically modifying the results, you may want to try\n{::backwardsScan} to avoid tripping over your own changes.\n\nregex - A {RegExp} to search for.\niterator -\nA {Function} that's called on each match with an {Object} containing the.\nfollowing keys:\n:match - The current regular expression match.\n:matchText - A {String} with the text of the match.\n:range - The {Range} of the match.\n:stop - Call this {Function} to terminate the scan.\n:replace - Call this {Function} with a {String} to replace the match. "
}
},
"792": {
"17": {
"name": "backwardsScan",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"iterator"
],
"range": [
[
792,
17
],
[
804,
1
]
],
"doc": " Public: Scan regular expression matches in the entire buffer in reverse\norder, calling the given iterator function on each match.\n\nregex - A {RegExp} to search for.\niterator -\nA {Function} that's called on each match with an {Object} containing the.\nfollowing keys:\n:match - The current regular expression match.\n:matchText - A {String} with the text of the match.\n:range - The {Range} of the match.\n:stop - Call this {Function} to terminate the scan.\n:replace - Call this {Function} with a {String} to replace the match. "
}
},
"804": {
"11": {
"name": "replace",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"replacementText"
],
"range": [
[
804,
11
],
[
830,
1
]
],
"doc": " Public: Replace all regular expression matches in the entire buffer.\n\nregex - A {RegExp} representing the matches to be replaced.\nreplacementText - A {String} representing the text to replace each match.\n\nReturns a {Number} representing the number of replacements made. "
}
},
"830": {
"15": {
"name": "scanInRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"range",
"iterator",
"reverse"
],
"range": [
[
830,
15
],
[
881,
1
]
],
"doc": " Public: Scan regular expression matches in a given range , calling the given\niterator function on each match.\n\nregex - A {RegExp} to search for.\nrange - A {Range} in which to search.\niterator -\nA {Function} that's called on each match with an {Object} containing the.\nfollowing keys:\n:match - The current regular expression match.\n:matchText - A {String} with the text of the match.\n:range - The {Range} of the match.\n:stop - Call this {Function} to terminate the scan.\n:replace - Call this {Function} with a {String} to replace the match. "
}
},
"881": {
"24": {
"name": "backwardsScanInRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"regex",
"range",
"iterator"
],
"range": [
[
881,
24
],
[
889,
1
]
],
"doc": " Public: Scan regular expression matches in a given range in reverse order,\ncalling the given iterator function on each match.\n\nregex - A {RegExp} to search for.\nrange - A {Range} in which to search.\niterator -\nA {Function} that's called on each match with an {Object} containing the.\nfollowing keys:\n:match - The current regular expression match.\n:matchText - A {String} with the text of the match.\n:range - The {Range} of the match.\n:stop - Call this {Function} to terminate the scan.\n:replace - Call this {Function} with a {String} to replace the match. "
}
},
"889": {
"14": {
"name": "isRowBlank",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"row"
],
"range": [
[
889,
14
],
[
897,
1
]
],
"doc": " Public: Determine if the given row contains only whitespace.\n\nrow - A {Number} representing a 0-indexed row.\n\nReturns a {Boolean}. "
}
},
"897": {
"23": {
"name": "previousNonBlankRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"startRow"
],
"range": [
[
897,
23
],
[
910,
1
]
],
"doc": " Public: Given a row, find the first preceding row that's not blank.\n\nstartRow - A {Number} identifying the row to start checking at.\n\nReturns a {Number} or `null` if there's no preceding non-blank row. "
}
},
"910": {
"19": {
"name": "nextNonBlankRow",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"startRow"
],
"range": [
[
910,
19
],
[
918,
1
]
],
"doc": " Public: Given a row, find the next row that's not blank.\n\nstartRow - A {Number} identifying the row to start checking at.\n\nReturns a {Number} or `null` if there's no next non-blank row. "
}
},
"918": {
"16": {
"name": "usesSoftTabs",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
918,
16
],
[
926,
1
]
],
"doc": null
}
},
"926": {
"10": {
"name": "change",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"oldRange",
"newText",
"options"
],
"range": [
[
926,
10
],
[
930,
1
]
],
"doc": null
}
},
"930": {
"32": {
"name": "cancelStoppedChangingTimeout",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
930,
32
],
[
933,
1
]
],
"doc": null
}
},
"933": {
"26": {
"name": "scheduleModifiedEvents",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
933,
26
],
[
942,
1
]
],
"doc": null
}
},
"942": {
"29": {
"name": "emitModifiedStatusChanged",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"modifiedStatus"
],
"range": [
[
942,
29
],
[
947,
1
]
],
"doc": null
}
},
"947": {
"12": {
"name": "logLines",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"start",
"end"
],
"range": [
[
947,
12
],
[
952,
1
]
],
"doc": null
}
},
"956": {
"8": {
"name": "undo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
956,
8
],
[
956,
25
]
],
"doc": " Public: Undo the last operation. If a transaction is in progress, aborts it. "
}
},
"959": {
"8": {
"name": "redo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
959,
8
],
[
959,
25
]
],
"doc": " Public: Redo the last operation "
}
},
"969": {
"12": {
"name": "transact",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"fn"
],
"range": [
[
969,
12
],
[
969,
40
]
],
"doc": " Public: Batch multiple operations as a single undo/redo step.\n\nAny group of operations that are logically grouped from the perspective of\nundoing and redoing should be performed in a transaction. If you want to\nabort the transaction, call {::abortTransaction} to terminate the function's\nexecution and revert any changes performed up to the abortion.\n\nfn - A {Function} to call inside the transaction. "
}
},
"977": {
"20": {
"name": "beginTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
977,
20
],
[
977,
49
]
],
"doc": " Public: Start an open-ended transaction.\n\nCall {::commitTransaction} or {::abortTransaction} to terminate the\ntransaction. If you nest calls to transactions, only the outermost\ntransaction is considered. You must match every begin with a matching\ncommit, but a single call to abort will cancel all nested transactions. "
}
},
"983": {
"21": {
"name": "commitTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
983,
21
],
[
983,
51
]
],
"doc": " Public: Commit an open-ended transaction started with {::beginTransaction}\nand push it to the undo stack.\n\nIf transactions are nested, only the outermost commit takes effect. "
}
},
"987": {
"20": {
"name": "abortTransaction",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
987,
20
],
[
987,
49
]
],
"doc": " Public: Abort an open transaction, undoing any operations performed so far\nwithin the transaction. "
}
},
"990": {
"18": {
"name": "clearUndoStack",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
990,
18
],
[
990,
45
]
],
"doc": " Public: Clear the undo stack. "
}
},
"1029": {
"13": {
"name": "markRange",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"range",
"properties"
],
"range": [
[
1029,
13
],
[
1029,
72
]
],
"doc": " Public: Create a marker with the given range. This marker will maintain\nits logical location as the buffer is changed, so if you mark a particular\nword, the marker will remain over that word even if the word's location in\nthe buffer changes.\n\n* range: A {Range} or range-compatible {Array}\n* properties:\n A hash of key-value pairs to associate with the marker. There are also\n reserved property names that have marker-specific meaning:\n :reversed -\n Creates the marker in a reversed orientation. Defaults to false.\n :persistent -\n Whether to include this marker when serializing the buffer. Defaults\n to true.\n :invalidate -\n Determines the rules by which changes to the buffer *invalidate* the\n marker. Defaults to 'overlap', but can be any of the following\n strategies, in order of fragility:\n * 'never':\n The marker is never marked as invalid. This is a good choice for\n markers representing selections in an editor.\n * 'surround':\n The marker is invalidated by changes that completely surround it.\n * 'overlap':\n The marker is invalidated by changes that surround the start or\n end of the marker. This is the default.\n * 'inside':\n The marker is invalidated by changes that extend into the\n inside of the marker. Changes that end at the marker's start or\n start at the marker's end do not invalidate the marker.\n * 'touch':\n The marker is invalidated by a change that touches the marked\n region in any way, including changes that end at the marker's\n start or start at the marker's end. This is the most fragile\n strategy.\n\nReturns a {Marker}. "
}
},
"1037": {
"16": {
"name": "markPosition",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"position",
"properties"
],
"range": [
[
1037,
16
],
[
1037,
84
]
],
"doc": " Public: Create a marker at the given position with no tail.\n\n:position - {Point} or point-compatible {Array}\n:properties - This is the same as the `properties` parameter in {::markRange}\n\nReturns a {Marker}. "
}
},
"1042": {
"13": {
"name": "getMarker",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"id"
],
"range": [
[
1042,
13
],
[
1042,
42
]
],
"doc": " Public: Get an existing marker by its id.\n\nReturns a {Marker}. "
}
},
"1047": {
"14": {
"name": "getMarkers",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
1047,
14
],
[
1047,
37
]
],
"doc": " Public: Get all existing markers on the buffer.\n\nReturns an {Array} of {Marker}s. "
}
},
"1069": {
"15": {
"name": "findMarkers",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
1069,
15
],
[
1069,
54
]
],
"doc": " Public: Find markers conforming to the given parameters.\n\n:params -\nA hash of key-value pairs constraining the set of returned markers. You\ncan query against custom marker properties by listing the desired\nkey-value pairs here. In addition, the following keys are reserved and\nhave special semantics:\n* 'startPosition': Only include markers that start at the given {Point}.\n* 'endPosition': Only include markers that end at the given {Point}.\n* 'containsPoint': Only include markers that contain the given {Point}, inclusive.\n* 'containsRange': Only include markers that contain the given {Range}, inclusive.\n* 'startRow': Only include markers that start at the given row {Number}.\n* 'endRow': Only include markers that end at the given row {Number}.\n* 'intersectsRow': Only include markers that intersect the given row {Number}.\n\nFinds markers that conform to all of the given parameters. Markers are\nsorted based on their position in the buffer. If two markers start at the\nsame position, the larger marker comes first.\n\nReturns an {Array} of {Marker}s. "
}
},
"1074": {
"18": {
"name": "getMarkerCount",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
1074,
18
],
[
1074,
45
]
],
"doc": " Public: Get the number of markers in the buffer.\n\nReturns a {Number}. "
}
}
},
"exports": 68
},
"./src/transaction.coffee": {
"objects": {
"0": {
"1": {
"type": "import",
"range": [
[
0,
1
],
[
0,
4
]
],
"bindingType": "variable",
"module": "underscore-plus@1.x",
"name": "find",
"exportsProperty": "find"
}
},
"1": {
"15": {
"name": "Serializable",
"type": "import",
"range": [
[
1,
15
],
[
1,
36
]
],
"bindingType": "variable",
"module": "serializable@1.x"
}
},
"2": {
"14": {
"name": "BufferPatch",
"type": "import",
"range": [
[
2,
14
],
[
2,
37
]
],
"bindingType": "variable",
"path": "./buffer-patch"
}
},
"3": {
"14": {
"name": "MarkerPatch",
"type": "import",
"range": [
[
3,
14
],
[
3,
37
]
],
"bindingType": "variable",
"path": "./marker-patch"
}
},
"7": {
"0": {
"type": "class",
"name": "Transaction",
"bindingType": "exports",
"classProperties": [],
"prototypeProperties": [
[
12,
19
],
[
15,
21
],
[
19,
8
],
[
22,
10
],
[
25,
11
],
[
28,
20
]
],
"doc": " Private: Contains several patches that we want to undo/redo as a batch. ",
"range": [
[
7,
0
],
[
29,
58
]
]
}
},
"12": {
"19": {
"name": "serializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
12,
19
],
[
15,
1
]
],
"doc": null
}
},
"15": {
"21": {
"name": "deserializeParams",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"params"
],
"range": [
[
15,
21
],
[
19,
1
]
],
"doc": null
}
},
"19": {
"8": {
"name": "push",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"patch"
],
"range": [
[
19,
8
],
[
22,
1
]
],
"doc": null
}
},
"22": {
"10": {
"name": "invert",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"buffer"
],
"range": [
[
22,
10
],
[
25,
1
]
],
"doc": null
}
},
"25": {
"11": {
"name": "applyTo",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [
"buffer"
],
"range": [
[
25,
11
],
[
28,
1
]
],
"doc": null
}
},
"28": {
"20": {
"name": "hasBufferPatches",
"bindingType": "prototypeProperty",
"type": "function",
"paramNames": [],
"range": [
[
28,
20
],
[
29,
58
]
],
"doc": null
}
}
},
"exports": 7
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment