mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
fix #120680.
This commit is contained in:
@@ -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!; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user