From 12d5f0beba4eeb86b071b6329f3ab99d714088d0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Thu, 6 Feb 2025 08:36:56 +0100 Subject: [PATCH] Add scrolling into view to insertAtCursor syscall --- plug-api/syscalls/editor.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plug-api/syscalls/editor.ts b/plug-api/syscalls/editor.ts index 57ead963..57245611 100644 --- a/plug-api/syscalls/editor.ts +++ b/plug-api/syscalls/editor.ts @@ -272,8 +272,11 @@ export function moveCursorToLine( * Insert text at the cursor position in the editor * @param text the text to insert */ -export function insertAtCursor(text: string): Promise { - return syscall("editor.insertAtCursor", text); +export function insertAtCursor( + text: string, + scrollIntoView = false, +): Promise { + return syscall("editor.insertAtCursor", text, scrollIntoView); } /**