Skip to content

Commit

Permalink
DefinitelyTyped#883 fix - ace editor.selection.getCursor() should ret…
Browse files Browse the repository at this point in the history
…urn Position not number
  • Loading branch information
Diullei committed Sep 7, 2013
1 parent 3b38ed9 commit 9ecc886
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ace/ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare module AceAjax {
export interface TokenInfo {

value: string;
}
}

export interface Position {

Expand Down Expand Up @@ -1023,7 +1023,7 @@ declare module AceAjax {

new (text: string[], mode?: string): IEditSession;
}

////////////////////////////////
/// Editor
////////////////////////////////
Expand All @@ -1040,7 +1040,7 @@ declare module AceAjax {
selectMoreLines(n: number);

onTextInput(text: string);

onCommandKey(e, hashId, keyCode);

commands: CommandManager;
Expand Down Expand Up @@ -1702,7 +1702,7 @@ declare module AceAjax {

}

var Editor: {
var Editor: {
/**
* Creates a new `Editor` object.
* @param renderer Associated `VirtualRenderer` that draws everything
Expand Down Expand Up @@ -1773,7 +1773,7 @@ declare module AceAjax {
new (session: Document, length: number, pos: number, others: string, mainClass: string, othersClass: string): PlaceHolder;

new (session: IEditSession, length: number, pos: Position, positions: Position[]): PlaceHolder;
}
}

////////////////
/// RangeList
Expand Down Expand Up @@ -1998,7 +1998,7 @@ declare module AceAjax {
var Range: {
fromPoints(pos1: Position, pos2: Position): Range;
new(startRow: number, startColumn: number, endRow: number, endColumn: number): Range;
}
}

////////////////
/// RenderLoop
Expand Down Expand Up @@ -2157,7 +2157,7 @@ declare module AceAjax {
/**
* Gets the current position of the cursor.
**/
getCursor(): number;
getCursor(): Position;

/**
* Sets the row and column position of the anchor. This function also emits the `'changeSelection'` event.
Expand Down Expand Up @@ -2377,7 +2377,7 @@ declare module AceAjax {
* @param session The session to use
**/
new(session: IEditSession): Selection;
}
}

////////////////
/// Split
Expand Down Expand Up @@ -2529,7 +2529,7 @@ declare module AceAjax {
* @param flag Any additional regular expression flags to pass (like "i" for case insensitive)
**/
new(rules: any, flag: string): Tokenizer;
}
}

//////////////////
/// UndoManager
Expand Down

0 comments on commit 9ecc886

Please sign in to comment.