@lvce-editor/editor-worker 19.61.3 → 19.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorWorkerMain.js +3 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -10286,14 +10286,16 @@ const getChanges = (lines, selections, languageConfiguration, indentUnit) => {
|
|
|
10286
10286
|
if (isEmpty(selectionStartRow, selectionStartColumn, selectionEndRow, selectionEndColumn)) {
|
|
10287
10287
|
const line = lines[selectionStartRow];
|
|
10288
10288
|
const before = line.slice(0, selectionStartColumn);
|
|
10289
|
+
const after = line.slice(selectionStartColumn);
|
|
10289
10290
|
const indent = getIndent(before);
|
|
10290
10291
|
if (shouldIncreaseIndent(before, increaseIndentRegex)) {
|
|
10292
|
+
const inserted = after ? ['', indent + indentUnit, indent] : ['', indent + indentUnit];
|
|
10291
10293
|
changes.push({
|
|
10292
10294
|
deleted: getSelectionText({
|
|
10293
10295
|
lines
|
|
10294
10296
|
}, range),
|
|
10295
10297
|
end: end,
|
|
10296
|
-
inserted
|
|
10298
|
+
inserted,
|
|
10297
10299
|
origin: InsertLineBreak,
|
|
10298
10300
|
start: start
|
|
10299
10301
|
});
|