From ea38e95e6b0e888c630f95ece8eedcf8ee18111a Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Tue, 2 Sep 2025 03:07:50 +0100 Subject: [PATCH] add a few additional motions to be parsed by yank --- fcore/normal-mode/normal-mode.sml | 2 ++ shell/gl-draw.sml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fcore/normal-mode/normal-mode.sml b/fcore/normal-mode/normal-mode.sml index 40a7d35..402b80a 100644 --- a/fcore/normal-mode/normal-mode.sml +++ b/fcore/normal-mode/normal-mode.sml @@ -268,6 +268,8 @@ struct let val f = fn (buffer, cursorIdx, _) => Cursor.vi0 (buffer, cursorIdx) in yankWhenMovingBack (app, f, 1) end + | #"w" => yankWhenMovingForward (app, Cursor.nextWord, count) + | #"W" => yankWhenMovingForward (app, Cursor.nextWORD, count) | _ => app fun parseYank (strPos, str, count, app, chrCmd, time) = diff --git a/shell/gl-draw.sml b/shell/gl-draw.sml index 59d0166..95ae10b 100644 --- a/shell/gl-draw.sml +++ b/shell/gl-draw.sml @@ -231,9 +231,8 @@ struct fun yank (shellState: t, str) = let (* print when text is yanked *) - val msg = String.toCString str + val msg = "|" ^ String.toCString str ^ "|\n" val () = print msg - val () = print "\n" val () = Glfw.setClipboardString (#window shellState, str) in shellState