mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-05-07 18:48:39 +00:00
lint
This commit is contained in:
@@ -110,7 +110,7 @@ const programmaticCursorLineField = StateField.define({
|
|||||||
for (const effects of transitionState.effects) {
|
for (const effects of transitionState.effects) {
|
||||||
if(effects.is(setProgrammaticCursorLine)) {
|
if(effects.is(setProgrammaticCursorLine)) {
|
||||||
const pos = effects.value;
|
const pos = effects.value;
|
||||||
if (pos == null) return Decoration.none;
|
if(pos == null) return Decoration.none;
|
||||||
const line = transitionState.state.doc.lineAt(pos);
|
const line = transitionState.state.doc.lineAt(pos);
|
||||||
|
|
||||||
return Decoration.set([
|
return Decoration.set([
|
||||||
@@ -357,9 +357,9 @@ const CodeEditor = forwardRef(
|
|||||||
const view = viewRef.current;
|
const view = viewRef.current;
|
||||||
|
|
||||||
|
|
||||||
view.dispatch(
|
view.dispatch(
|
||||||
view.state.replaceSelection(text)
|
view.state.replaceSelection(text)
|
||||||
);
|
);
|
||||||
view.focus();
|
view.focus();
|
||||||
},
|
},
|
||||||
getCursorPosition : ()=>viewRef.current.state.selection.main.head,
|
getCursorPosition : ()=>viewRef.current.state.selection.main.head,
|
||||||
@@ -401,9 +401,9 @@ const CodeEditor = forwardRef(
|
|||||||
|
|
||||||
view.focus();
|
view.focus();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(()=>{
|
||||||
view.dispatch({
|
view.dispatch({
|
||||||
effects: setProgrammaticCursorLine.of(null)
|
effects : setProgrammaticCursorLine.of(null)
|
||||||
});
|
});
|
||||||
}, 400);
|
}, 400);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user