File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
webviews/src/utils/formatters Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,11 @@ export class WebviewPanel extends Webview implements vscode.Disposable {
147
147
opts . column || vscode . ViewColumn . One ,
148
148
this . getWebviewOptions ( ) ,
149
149
)
150
+
151
+ // todo: connection between webviews
152
+ if ( opts . message ) {
153
+ await this . panel . webview . postMessage ( opts . message )
154
+ }
150
155
// Update the content
151
156
this . update ( )
152
157
@@ -157,11 +162,6 @@ export class WebviewPanel extends Webview implements vscode.Disposable {
157
162
this . dispose ( )
158
163
} , null , this . _disposables )
159
164
160
- // todo: connection between webviews
161
- if ( opts . message ) {
162
- this . panel . webview . postMessage ( opts . message )
163
- }
164
-
165
165
// Update the content based on view changes
166
166
// this.panel.onDidChangeViewState(
167
167
// e => {
Original file line number Diff line number Diff line change @@ -124,12 +124,17 @@ const formattingBuffer = (
124
124
}
125
125
}
126
126
case KeyValueFormat . Vector64Bit : {
127
+ const valueUTF = bufferToUTF8 ( reply )
127
128
try {
129
+ if ( isEqualBuffers ( reply , UTF8ToBuffer ( valueUTF ) ) ) {
130
+ return { value : valueUTF , isValid : false }
131
+ }
132
+
128
133
const vector = Array . from ( bufferToFloat64Array ( reply . data as Uint8Array ) )
129
134
const value = JSONBigInt . stringify ( vector )
130
135
return JSONViewer ( { value, useNativeBigInt : false , ...props } )
131
136
} catch ( e ) {
132
- return { value : bufferToUTF8 ( reply ) , isValid : false }
137
+ return { value : valueUTF , isValid : false }
133
138
}
134
139
}
135
140
case KeyValueFormat . Protobuf : {
You can’t perform that action at this time.
0 commit comments