Skip to content

Commit 0699917

Browse files
committed
feat: date tribute game in explore project
1 parent a1e1d4f commit 0699917

File tree

3 files changed

+659
-2
lines changed

3 files changed

+659
-2
lines changed

docs/API-Reference/document/Document.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const Document = brackets.getModule("document/Document")
2727
* [.replaceRange(text, start, end, origin)](#Document+replaceRange)
2828
* [.getRange(start, end)](#Document+getRange) ⇒ <code>string</code>
2929
* [.getLine(Zero-based)](#Document+getLine) ⇒ <code>string</code>
30+
* [.posFromIndex(index)](#Document+posFromIndex) ⇒ <code>Object</code>
3031
* [.batchOperation(doOperation)](#Document+batchOperation)
3132
* [.notifySaved()](#Document+notifySaved)
3233
* [.adjustPosForChange(pos, textLines, start, end)](#Document+adjustPosForChange) ⇒ <code>Object</code>
@@ -240,6 +241,19 @@ Returns the text of the given line (excluding any line ending characters)
240241
| --- | --- | --- |
241242
| Zero-based | <code>number</code> | line number |
242243

244+
<a name="Document+posFromIndex"></a>
245+
246+
### document.posFromIndex(index) ⇒ <code>Object</code>
247+
Given a character index within the document text (assuming \n newlines),
248+
returns the corresponding {line, ch} position. Works whether or not
249+
a master editor is attached.
250+
251+
**Kind**: instance method of [<code>Document</code>](#Document)
252+
253+
| Param | Type | Description |
254+
| --- | --- | --- |
255+
| index | <code>number</code> | Zero-based character offset |
256+
243257
<a name="Document+batchOperation"></a>
244258

245259
### document.batchOperation(doOperation)

0 commit comments

Comments
 (0)