Skip to content

Commit e313b9e

Browse files
committed
FIX: not using fixed values in vector indentation
1 parent 79724fc commit e313b9e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/core/t-vector.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ void Set_Vector_Row(REBSER *ser, REBVAL *blk)
639639
if (bits >= VTUI08 && bits <= VTUI64) Append_Bytes(mold->series, "unsigned ");
640640
Emit(mold, "N I I [", type+1, VECT_BIT_SIZE(bits), len);
641641
if (indented && len > 10) {
642-
mold->indent = 1;
642+
mold->indent++;
643643
New_Indented_Line(mold);
644644
}
645645
}
@@ -665,7 +665,7 @@ void Set_Vector_Row(REBSER *ser, REBVAL *blk)
665665

666666
if (molded) {
667667
if (indented && len > 10) {
668-
mold->indent = 0;
668+
mold->indent--;
669669
New_Indented_Line(mold);
670670
}
671671
Append_Byte(mold->series, ']');

src/tests/units/series-test.r3

+12
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,18 @@ Rebol [
230230
0 0 0 0 0 0 0 0 0 0
231231
0 0 0 0 0 0 0 0 0 0
232232
]]}
233+
v: make vector! [integer! 8 20]
234+
--assert (mold reduce [
235+
1 2
236+
v
237+
3 4
238+
]) = {[
239+
1 2 make vector! [integer! 8 20 [
240+
0 0 0 0 0 0 0 0 0 0
241+
0 0 0 0 0 0 0 0 0 0
242+
]]
243+
3 4
244+
]}
233245

234246
===end-group===
235247

0 commit comments

Comments
 (0)