documents with the untitled-scheme are consider untitled, #48269

This commit is contained in:
Johannes Rieken
2018-04-26 15:56:43 +02:00
parent b27ecc6100
commit c73ea16347
2 changed files with 5 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ import * as vscode from 'vscode';
import { getWordAtText, ensureValidWordDefinition } from 'vs/editor/common/model/wordHelper';
import { MainThreadDocumentsShape } from './extHost.protocol';
import { TPromise } from 'vs/base/common/winjs.base';
import { Schemas } from 'vs/base/common/network';
const _modeId2WordDefinition = new Map<string, RegExp>();
export function setWordDefinitionFor(modeId: string, wordDefinition: RegExp): void {
@@ -68,8 +69,7 @@ export class ExtHostDocumentData extends MirrorTextModel {
this._document = {
get uri() { return data._uri; },
get fileName() { return data._uri.fsPath; },
// todo@remote -> https://github.com/Microsoft/vscode/issues/48269
get isUntitled() { return data._uri.scheme !== 'file'; },
get isUntitled() { return data._uri.scheme === Schemas.untitled; },
get languageId() { return data._languageId; },
get version() { return data._versionId; },
get isClosed() { return data._isDisposed; },