Update text-editing.ts

This commit is contained in:
Ivan 2025-06-10 21:27:41 +03:00
parent f0f41a4dcb
commit 5dcaae4f51

View File

@ -147,7 +147,6 @@ export class RSTextWrapper extends CodeMirrorWrapper {
case TokenID.BOOLEAN: { case TokenID.BOOLEAN: {
if (!hasSelection && selection.from >= 2) { if (!hasSelection && selection.from >= 2) {
const enclosingText = this.ref.view.state.sliceDoc(selection.from - 2, selection.from + 1); const enclosingText = this.ref.view.state.sliceDoc(selection.from - 2, selection.from + 1);
console.log(enclosingText);
if (enclosingText === '()') { if (enclosingText === '()') {
this.ref.view.dispatch({ this.ref.view.dispatch({
changes: [{ from: selection.from - 2, insert: '' }] changes: [{ from: selection.from - 2, insert: '' }]