@node-projects/web-component-designer-codeview-monaco 0.1.12 → 0.1.13
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.
|
@@ -153,8 +153,13 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
153
153
|
});
|
|
154
154
|
this._monacoEditor.onDidChangeCursorPosition(e => {
|
|
155
155
|
const offset = this._monacoEditor.getModel().getOffsetAt(e.position);
|
|
156
|
-
|
|
156
|
+
let debounce = false;
|
|
157
|
+
if (this._instanceServiceContainer && debounce) {
|
|
158
|
+
debounce = true;
|
|
157
159
|
this._disableSelection = true;
|
|
160
|
+
setTimeout(() => {
|
|
161
|
+
debounce = false;
|
|
162
|
+
}, 50);
|
|
158
163
|
this._instanceServiceContainer.selectionService.setSelectionByTextRange(offset, offset);
|
|
159
164
|
this._disableSelection = false;
|
|
160
165
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "web-component-designer addon: Code Editor using Monaco",
|
|
3
3
|
"name": "@node-projects/web-component-designer-codeview-monaco",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/widgets/codeView/code-view-monaco.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|