File tree Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -623,10 +623,16 @@ end = struct
623623 assert (Array. length a > 0 );
624624 if (size n).y > 0 && has_border (Pos. move_y pos' ~- 1 ) conn_m.m then
625625 conn_m.m < - create_or_update ~ct: `Nontree ~bottom: true (Pos. move_y pos' ~- 1 ) conn_m.m;
626+ (* To blend-in an empty tree root with a "wall" to the left: *)
627+ (* if (size n).y = 0 then
628+ conn_m.m <- create_or_update ~ct:`Nontree ~right:true (Pos.move_x pos' ~-1) conn_m.m; *)
626629 let _ = _array_foldi
627630 (fun pos' i b ->
628- let s = " └─" in
629- conn_m.m < - create_or_update ~ct: `Tree ~top: true ~right: true pos' conn_m.m;
631+ let s = if pos'.y = pos.y then " ──" else " └─" in
632+ if pos'.y <> pos.y then
633+ conn_m.m < - create_or_update ~ct: `Tree ~top: true ~right: true pos' conn_m.m
634+ else
635+ conn_m.m < - create_or_update ~ct: `Tree ~left: true ~right: true pos' conn_m.m;
630636 conn_m.m < - create_or_update ~ct: `Tree ~left: true ~right: true (Pos. move_x pos' 1 ) conn_m.m;
631637 conn_m.m < - create_or_update ~ct: `Tree ~top: true (Pos. move_y pos' 1 ) conn_m.m;
632638 if i< Array. length a-1 then (
Original file line number Diff line number Diff line change 1414│ ├──────────────────────────────────────────────────────────────┤
1515│ │[32mMatt[0m │
1616├─────────────────┼──────────────────────────────────────────────────────────────┤
17- │dependencies │├ ─mandatory │
17+ │dependencies │┬ ─mandatory │
1818│ ││ ├─dune │
1919│ ││ ├─bytes │
2020│ ││ ├─uutf │
Original file line number Diff line number Diff line change 66│ └───────┘
77├─child 2
88├─┬──────────────────┐
9- │ │└ ─┬────────┐ │
9+ │ │─ ─┬────────┐ │
1010│ │ │header 3│ │
1111│ │ ├────────┘ │
1212│ │ └─┬──────────┐ │
1313│ │ │subchild 3│ │
1414│ │ └──────────┘ │
1515│ └──────────────────┘
16- ├─└ ─┬────────┐
16+ ├── ─┬────────┐
1717│ │header 4│
1818│ ├────────┘
1919│ └─┬──────────┐
2020│ │subchild 4│
2121│ └──────────┘
22- └─┬───────┐
23- │child 5│
24- └───────┘
22+ ├─┬───────┐
23+ │ │child 5│
24+ │ └───────┘
25+ └─┬──────────────────┐
26+ │┌────────┐ │
27+ ││header 6│ │
28+ │├────────┘ │
29+ │└─┬───────┐ │
30+ │ │child 6│ │
31+ │ ├───────┘ │
32+ │ └─┬──────────┐ │
33+ │ │subchild 6│ │
34+ │ └──────────┘ │
35+ └──────────────────┘
Original file line number Diff line number Diff line change 99 tree empty [
1010 tree (frame @@ text " header 4" ) [frame @@ text " subchild 4" ]
1111 ];
12- frame @@ text " child 5"
12+ frame @@ text " child 5" ;
13+ frame @@ tree (frame @@ text " header 6" ) [
14+ tree (frame @@ text " child 6" ) [frame @@ text " subchild 6" ]
15+ ]
1316 ]
1417
1518let () = print_endline @@ PrintBox_text. to_string b
You can’t perform that action at this time.
0 commit comments