Skip to content

Commit

Permalink
space moves over grout, newline moves over newline
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Nov 12, 2024
1 parent da58dc6 commit d875880
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/editor/Modify.re
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ let finalize = (~mode=Mode.Navigating, ~fill=Cell.dirty, ctx: Ctx.t): Zipper.t =

let try_move = (s: string, z: Zipper.t) =>
switch (s, Ctx.face(~side=R, z.ctx)) {
| (" ", Node(tok)) when String.starts_with(~prefix=" ", tok.text) =>
| (" ", Node(tok))
when
String.starts_with(~prefix=" ", tok.text) || Mtrl.is_grout(tok.mtrl) =>
Move.perform(Step(H(R)), z)
| ("\n", Node(tok)) when String.starts_with(~prefix="\n", tok.text) =>
Move.perform(Step(H(R)), z)
| _ => None
};
Expand Down

0 comments on commit d875880

Please sign in to comment.