Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/vs/workbench/contrib/comments/browser/commentReply.ts')
-rw-r--r--src/vs/workbench/contrib/comments/browser/commentReply.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vs/workbench/contrib/comments/browser/commentReply.ts b/src/vs/workbench/contrib/comments/browser/commentReply.ts
index 0905db307c3..68eda2e6e39 100644
--- a/src/vs/workbench/contrib/comments/browser/commentReply.ts
+++ b/src/vs/workbench/contrib/comments/browser/commentReply.ts
@@ -17,6 +17,7 @@ import { ILanguageService } from 'vs/editor/common/languages/language';
import { ITextModel } from 'vs/editor/common/model';
import { IModelService } from 'vs/editor/common/services/model';
import * as nls from 'vs/nls';
+import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { editorForeground, resolveColorValue } from 'vs/platform/theme/common/colorRegistry';
@@ -58,11 +59,12 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
@ILanguageService private languageService: ILanguageService,
@IModelService private modelService: IModelService,
@IThemeService private themeService: IThemeService,
+ @IConfigurationService configurationService: IConfigurationService
) {
super();
this.form = dom.append(container, dom.$('.comment-form'));
- this.commentEditor = this._register(this._scopedInstatiationService.createInstance(SimpleCommentEditor, this.form, SimpleCommentEditor.getEditorOptions(), this._parentThread));
+ this.commentEditor = this._register(this._scopedInstatiationService.createInstance(SimpleCommentEditor, this.form, SimpleCommentEditor.getEditorOptions(configurationService), this._parentThread));
this.commentEditorIsEmpty = CommentContextKeys.commentIsEmpty.bindTo(this._contextKeyService);
this.commentEditorIsEmpty.set(!this._pendingComment);
@@ -216,8 +218,8 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
this._commentThreadDisposables.push(this._commentThread.onDidChangeInput(input => {
const thread = this._commentThread;
-
- if (thread.input && thread.input.uri !== commentEditor.getModel()!.uri) {
+ const model = commentEditor.getModel();
+ if (thread.input && model && (thread.input.uri !== model.uri)) {
return;
}
if (!input) {