Skip to content

Commit

Permalink
avoid hd lines for left-delimited multi-line args
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Nov 9, 2024
1 parent 5962634 commit 487600b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/web/view/dec/Child.re
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,19 @@ let view = (~font, p: Profile.t) => {
|> Option.map(includes_all_but_padding(~side=R, end_loc.col))
|> Option.value(~default=false);

let b =
height <= 0
|| Option.is_none(fst(p.no_delim))
&& r_closed_by_delim_after_newline
&& height <= 1;

let hd_line =
hd.rest == 0 || height > 0 && l_open_and_covers_row
hd.rest == 0
|| height > 0
&& l_open_and_covers_row
|| height > 0
&& Option.is_none(fst(p.no_delim))
&& !b
? []
: Util.Svgs.Path.[
m(~x=p.loc.col, ~y=p.loc.row + 1)
Expand All @@ -100,10 +111,7 @@ let view = (~font, p: Profile.t) => {
),
];
let body_line =
height <= 0
|| Option.is_none(fst(p.no_delim))
&& r_closed_by_delim_after_newline
&& height <= 1
b
? []
: Util.Svgs.Path.[
m(~x=p.ind, ~y=p.loc.row)
Expand Down

0 comments on commit 487600b

Please sign in to comment.