From 276661319c2d5c1319fd5831a7c3bdcc317251db Mon Sep 17 00:00:00 2001 From: David Moon Date: Fri, 3 Jan 2025 14:22:53 -0500 Subject: [PATCH] fix truncation bug causing duplicated selected token to appear on subsequent expansion --- src/core/editor/Modify.re | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/editor/Modify.re b/src/core/editor/Modify.re index 69148f10..195af3f3 100644 --- a/src/core/editor/Modify.re +++ b/src/core/editor/Modify.re @@ -561,7 +561,7 @@ let try_truncate = (z: Zipper.t) => { }; ctx |> Ctx.push(~onto=L, tok) - |> Ctx.push(~onto=R, tok) + |> (Token.is_complete(tok) ? Fun.id : Ctx.push(~onto=R, tok)) |> Zipper.mk |> Option.some; | _ => None