Skip to content

Commit 3d81709

Browse files
committed
Remove usages of mode from monaco.d.ts
1 parent ec64531 commit 3d81709

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

src/vs/editor/browser/editorBrowser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export interface IPartialEditorMouseEvent {
326326
*/
327327
export interface IPasteEvent {
328328
readonly range: Range;
329-
readonly mode: string | null;
329+
readonly languageId: string | null;
330330
}
331331

332332
/**

src/vs/editor/browser/widget/codeEditorWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
11041104
if (source === 'keyboard') {
11051105
this._onDidPaste.fire({
11061106
range: new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column),
1107-
mode: mode
1107+
languageId: mode
11081108
});
11091109
}
11101110
}

src/vs/editor/common/model.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,7 @@ export interface ITextModel {
12811281
onWillDispose(listener: () => void): IDisposable;
12821282

12831283
/**
1284-
* Destroy this model. This will unbind the model from the mode
1285-
* and make all necessary clean-up to release this object to the GC.
1284+
* Destroy this model.
12861285
*/
12871286
dispose(): void;
12881287

src/vs/editor/common/model/textModelEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Selection } from 'vs/editor/common/core/selection';
88
import { IModelDecoration, InjectedTextOptions } from 'vs/editor/common/model';
99

1010
/**
11-
* An event describing that the current mode associated with a model has changed.
11+
* An event describing that the current language associated with a model has changed.
1212
*/
1313
export interface IModelLanguageChangedEvent {
1414
/**

src/vs/monaco.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,8 +2055,7 @@ declare namespace monaco.editor {
20552055
*/
20562056
onWillDispose(listener: () => void): IDisposable;
20572057
/**
2058-
* Destroy this model. This will unbind the model from the mode
2059-
* and make all necessary clean-up to release this object to the GC.
2058+
* Destroy this model.
20602059
*/
20612060
dispose(): void;
20622061
/**
@@ -2487,7 +2486,7 @@ declare namespace monaco.editor {
24872486
};
24882487

24892488
/**
2490-
* An event describing that the current mode associated with a model has changed.
2489+
* An event describing that the current language associated with a model has changed.
24912490
*/
24922491
export interface IModelLanguageChangedEvent {
24932492
/**
@@ -4680,7 +4679,7 @@ declare namespace monaco.editor {
46804679
*/
46814680
export interface IPasteEvent {
46824681
readonly range: Range;
4683-
readonly mode: string | null;
4682+
readonly languageId: string | null;
46844683
}
46854684

46864685
export interface IEditorConstructionOptions extends IEditorOptions {

src/vs/workbench/browser/parts/editor/textResourceEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ export class TextResourceEditor extends AbstractTextResourceEditor {
190190

191191
// A mode is provided via the paste event so text was copied using
192192
// VSCode. As such we trust this mode and use it if specific
193-
if (e.mode) {
194-
candidateMode = e.mode;
193+
if (e.languageId) {
194+
candidateMode = e.languageId;
195195
}
196196

197197
// A mode was not provided, so the data comes from outside VSCode

0 commit comments

Comments
 (0)