Skip to content

Commit e83f36c

Browse files
authored
break loop when truncating (#702)
1 parent ca19105 commit e83f36c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/ark/src/variables/variable.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,14 @@ impl WorkspaceVariableDisplayValue {
205205

206206
if display_value.len() > MAX_DISPLAY_VALUE_LENGTH || display_i.is_truncated {
207207
is_truncated = true;
208+
break;
208209
}
209210
}
210211

211-
display_value.push(']');
212+
if !is_truncated {
213+
display_value.push_str("]");
214+
}
215+
212216
Self::new(display_value, is_truncated)
213217
}
214218

0 commit comments

Comments
 (0)