Merge pull request #4421 from borisyankov/basarat-patch-1

feat(ace) specialize 'change'
This commit is contained in:
Basarat Ali Syed
2015-05-22 18:04:13 +10:00

12
ace/ace.d.ts vendored
View File

@@ -1034,9 +1034,10 @@ declare module AceAjax {
* Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
**/
export interface Editor {
addEventListener(ev: string, callback: Function);
addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any);
addEventListener(ev: string, callback: Function);
inMultiSelectMode: boolean;
selectMoreLines(n: number);
@@ -1712,6 +1713,13 @@ declare module AceAjax {
**/
new(renderer: VirtualRenderer, session?: IEditSession): Editor;
}
interface EditorChangeEvent {
start: Position;
end: Position;
action: string; // insert, remove
lines: any[];
}
////////////////////////////////
/// PlaceHolder