Jelajahi Sumber

Fix a bug in multiple-selection edits

Eric Zhang 4 tahun lalu
induk
melakukan
7e763556a5
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      src/rustpad.ts

+ 1 - 0
src/rustpad.ts

@@ -163,6 +163,7 @@ class Rustpad {
       if (typeof op === "string") {
         // Insert
         const pos = this.model.getPositionAt(index);
+        index += op.length;
         this.model.pushEditOperations(
           this.options.editor.getSelections(),
           [