Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Nov 4, 2024
1 parent 3c7a71f commit 9d478a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/editor/Modify.re
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ let rec remold = (~fill=Cell.dirty, ctx: Ctx.t): (Cell.t, Ctx.t) => {
(),
);
// hack(?) to avoid completion if no new ghosts are generated. if only
// grout are generated, then we can generated them later at the end of
// remolding. better to delay their generation bc there may be grout in
// the suffix whose relative position around neighboring whitespace we
// want to preserve.
// grout are generated, then we can generate them later as needed at the
// end of remolding. better to delay their generation bc there may already
// be grout in the suffix whose relative position around neighboring
// whitespace we want to preserve.
effs
|> List.for_all(
fun
Expand Down
8 changes: 7 additions & 1 deletion src/core/editor/Zipper.re
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ and unzip_select = (~ctx=Ctx.empty, sel: Path.Selection.t, meld: Meld.t) => {
};

let unzip_exn = (~ctx=Ctx.empty, c: Cell.t) =>
unzip(~ctx, c) |> Options.get_exn(Invalid_argument("Zipper.unzip_exn"));
switch (unzip(~ctx, c)) {
| Some(z) => z
| None =>
P.show("unzip_exn ctx", Ctx.show(ctx));
P.show("unzip_exn cell", Cell.show(c));
raise(Invalid_argument("Zipper.unzip_exn"));
};

let rec zip_neighbor = (~side: Dir.t, ~zipped: Cell.t, ctx: Ctx.t) => {
open Options.Syntax;
Expand Down

0 comments on commit 9d478a1

Please sign in to comment.