Use nullToUndefined more widely

This commit is contained in:
Matt Bierner
2019-03-11 13:49:16 -07:00
parent 794735f1d0
commit 37167ef695
28 changed files with 63 additions and 44 deletions

View File

@@ -16,6 +16,7 @@ import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2
import { IApplyEditsOptions, IEditorPropertiesChangeData, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate, IUndoStopOptions, TextEditorRevealType } from 'vs/workbench/api/node/extHost.protocol';
import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes';
import { IEditor } from 'vs/workbench/common/editor';
import { withNullAsUndefined } from 'vs/base/common/types';
export interface IFocusTracker {
onGainedFocus(): void;
@@ -114,7 +115,7 @@ export class MainThreadTextEditorProperties {
if (!oldProps || !MainThreadTextEditorProperties._selectionsEqual(oldProps.selections, this.selections)) {
delta.selections = {
selections: this.selections,
source: selectionChangeSource || undefined
source: withNullAsUndefined(selectionChangeSource)
};
}