Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Jul 4, 2024
1 parent b21ef52 commit 99faa14
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
4 changes: 1 addition & 3 deletions src/web/view/Code.re
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ let rec carets = (~font, c: Cell.t) => {

let cursor = (~font, z: Zipper.t) =>
switch (z.cur) {
| Select(_) =>
print_endline("0");
[];
| Select(_) => []
| Point(_) =>
let tree = Layout.Tree.of_cell(Zipper.zip(~save_cursor=true, z));
let (cell, ctx) = Zipper.zip_indicated(z);
Expand Down
30 changes: 0 additions & 30 deletions src/web/view/dec/Meld.re
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,6 @@ module Profile = {
}),
};
};
// let mk = (~state: Layout.State.t, m: Meld.t) => {
// let indent = {
// // todo: figure out better reorg for this recurring newline calc
// let M(l, _, _) = m;
// let newline = Dims.of_cell(l).height > 0;
// Layout.Ictx.middle(~newline, state.ctx);
// };
// let tokens =
// Meld.to_chain(m)
// |> Chain.mapi_link((step, tok) => (step, tok))
// |> Chain.unzip_links
// |> List.map(((pre, (step, tok), suf)) => {
// let l =
// Result.is_error(Chain.unlink(pre))
// && Cell.Space.is_space(Chain.hd(pre));
// let r =
// Result.is_error(Chain.unlink(suf))
// && Cell.Space.is_space(Chain.hd(suf));
// let pos =
// Cell.put(m)
// |> Cell.put_cursor(Point(Caret.focus([step, 0])))
// |> Layout.cursor(~state)
// |> Option.get
// |> Layout.Cursor.get_focus
// |> Option.get;
// T.Profile.mk(~pos, ~null=(l, r), tok);
// });
// let range = Layout.State.range(state, Dims.of_meld(m));
// {indent, tokens, range};
// };
};

let mk = (~font, prof: Profile.t) => List.map(T.mk(~font), prof.tokens);

0 comments on commit 99faa14

Please sign in to comment.