mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
strict null trouble
This commit is contained in:
@@ -216,7 +216,7 @@ export interface IUndoStopOptions {
|
||||
}
|
||||
|
||||
export interface IApplyEditsOptions extends IUndoStopOptions {
|
||||
setEndOfLine: EndOfLineSequence;
|
||||
setEndOfLine?: EndOfLineSequence;
|
||||
}
|
||||
|
||||
export interface ITextDocumentShowOptions {
|
||||
|
||||
@@ -447,7 +447,9 @@ export class MainThreadTextEditor {
|
||||
return false;
|
||||
}
|
||||
|
||||
this._model.pushEOL(opts.setEndOfLine);
|
||||
if (typeof opts.setEndOfLine !== 'undefined') {
|
||||
this._model.pushEOL(opts.setEndOfLine);
|
||||
}
|
||||
|
||||
const transformedEdits = edits.map((edit): IIdentifiedSingleEditOperation => {
|
||||
return {
|
||||
|
||||
@@ -607,7 +607,7 @@ export class ExtHostTextEditor implements vscode.TextEditor {
|
||||
});
|
||||
|
||||
return this._proxy.$tryApplyEdits(this._id, editData.documentVersionId, edits, {
|
||||
setEndOfLine: TypeConverters.EndOfLine.from(editData.setEndOfLine),
|
||||
setEndOfLine: editData.setEndOfLine && TypeConverters.EndOfLine.from(editData.setEndOfLine),
|
||||
undoStopBefore: editData.undoStopBefore,
|
||||
undoStopAfter: editData.undoStopAfter
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user