Skip to content

Commit

Permalink
emit missing effects
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Jan 5, 2025
1 parent 6c591d3 commit 4d1cbff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/editor/Modify.re
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ let mold =
// P.show("tok", Token.show(tok));
// P.show("grouted", Grouted.show(grouted));
// P.show("stack", Stack.show(l));
let connected = Stack.connect(tok, grouted, l);
let connected = Stack.connect(Effects.insert(tok), grouted, l);
// P.show("connected", Stack.show(connected));
connected.bound == l.bound
? Ctx.link_stacks((connected, r), rest)
Expand Down
4 changes: 3 additions & 1 deletion src/core/parser/Molder.re
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ and remold =
// P.show("hd_w", Token.show(hd_w));
switch (mold(~re=true, l, ~fill, Token.unmold(hd_w))) {
| Error(fill) =>
Effects.remove(hd_w);
let (c, up) = unroll_tl_w_hd_cell();
let fill = fill |> Cell.pad(~r=c) |> Cell.mark_ends_dirty;
(l, r_tl) |> Stack.Frame.cat(([], up)) |> remold(~fill);
Expand All @@ -175,7 +176,8 @@ and remold =
Error((fill, (connected, r_tl)));
};
| Ok((t, grouted, rest)) =>
let connected = Stack.connect(t, grouted, rest);
Effects.remove(hd_w);
let connected = Stack.connect(Effects.insert(t), grouted, rest);
// check if connection changed the stack bound
if (connected.bound == l.bound) {
// if not, then nearest bidelimited container is preserved
Expand Down

0 comments on commit 4d1cbff

Please sign in to comment.