textModel: add isForSimpleWidget property so these model are not synchronized

This commit is contained in:
isidor
2018-03-20 16:24:59 +01:00
parent 38bb950e17
commit f470ce19e7
19 changed files with 204 additions and 101 deletions

View File

@@ -28,6 +28,7 @@ import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common
import { localize } from 'vs/nls';
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
import { ILogService } from 'vs/platform/log/common/log';
import { shouldSynchronizeModel } from 'vs/editor/common/services/modelService';
export interface ISaveParticipantParticipant extends ISaveParticipant {
// progressMessage: string;
@@ -261,7 +262,7 @@ class ExtHostSaveParticipant implements ISaveParticipantParticipant {
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): Promise<void> {
if (editorModel.textEditorModel.isTooLargeForHavingARichMode()) {
if (!shouldSynchronizeModel(editorModel.textEditorModel)) {
// the model never made it to the extension
// host meaning we cannot participate in its save
return undefined;