Skip to content

Commit ffd330e

Browse files
committed
Show full value when only one output parameter
Signed-off-by: worksofliam <[email protected]>
1 parent f2e9297 commit ffd330e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/views/results/editorUi.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export function statementDone(uniqueId: string, options: { paramsOut?: Parameter
2525
const existingStatement = priorStatements[uniqueId];
2626
const activeEditor = window.activeTextEditor;
2727

28-
const shortValue = (v: any) => {
28+
const shortValue = (v: any, short = true) => {
2929
if (typeof v === "string") {
30-
return v.length > 10 ? `${v.substring(0, 10)}...` : v;
30+
return short && v.length > 10 ? `${v.substring(0, 10)}...` : v;
3131
}
3232
return v || `-`;
3333
};
@@ -52,7 +52,8 @@ export function statementDone(uniqueId: string, options: { paramsOut?: Parameter
5252
}
5353
});
5454

55-
const values = `=> ` + options.paramsOut.map(p => shortValue(p.value)).join(", ");
55+
const shouldBeShort = options.paramsOut.length > 1;
56+
const values = `=> ` + options.paramsOut.map((p) => shortValue(p.value, shouldBeShort)).join(", ");
5657

5758
const decoration: DecorationOptions = {
5859
range: new Range(startPosition, endPosition),

0 commit comments

Comments
 (0)