From 3d89b7ba7268e129889a127cb6288ffe54a28f26 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Sat, 13 Jan 2024 15:06:13 +0900 Subject: [PATCH] Fix copyToRegister to set a new mark --- src/commands/registers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/registers.ts b/src/commands/registers.ts index 46e66feed6..04bf7b3728 100644 --- a/src/commands/registers.ts +++ b/src/commands/registers.ts @@ -149,6 +149,8 @@ export class InsertRegister extends EmacsCommand { // Looking for how to insert-replace with selections highlighted.... must copy-paste from Yank command const selections = textEditor.selections; + this.emacsController.pushMark(selections.map((s) => s.active)); + await textEditor.edit((editBuilder) => { selections.forEach((selection) => { if (!selection.isEmpty) {