This commit is contained in:
rebornix
2021-11-01 18:10:08 -07:00
parent 7d46b77c31
commit 38cef76ce7
3 changed files with 7 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ export class MainThreadCommentThread implements modes.CommentThread {
if (modified('range')) { this._range = changes.range!; }
if (modified('label')) { this._label = changes.label; }
if (modified('contextValue')) { this._contextValue = changes.contextValue; }
if (modified('contextValue')) { this._contextValue = changes.contextValue === null ? undefined : changes.contextValue; }
if (modified('comments')) { this._comments = changes.comments; }
if (modified('collapseState')) { this._collapsibleState = changes.collapseState; }
if (modified('canReply')) { this.canReply = changes.canReply!; }

View File

@@ -154,7 +154,7 @@ export interface CommentProviderFeatures {
export type CommentThreadChanges = Partial<{
range: IRange,
label: string,
contextValue: string,
contextValue: string | null,
comments: modes.Comment[],
collapseState: modes.CommentThreadCollapsibleState;
canReply: boolean;

View File

@@ -425,7 +425,11 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
formattedModifications.label = this.label;
}
if (modified('contextValue')) {
formattedModifications.contextValue = this.contextValue;
/*
* null -> cleared contextValue
* undefined -> no change
*/
formattedModifications.contextValue = this.contextValue ?? null;
}
if (modified('comments')) {
formattedModifications.comments =