pull/444/head
Zef Hemel 2023-07-02 14:10:03 +02:00
parent 75aa3171ff
commit a116b7aadd
2 changed files with 7 additions and 5 deletions

View File

@ -107,7 +107,6 @@ export function FilterList({
}} }}
onChange={(text) => { onChange={(text) => {
setText(text); setText(text);
// updateFilter(text);
}} }}
onKeyUp={(view, e) => { onKeyUp={(view, e) => {
// This event is triggered after the key has been processed by CM already // This event is triggered after the key has been processed by CM already

View File

@ -99,11 +99,14 @@ export function MiniEditor(
useEffect(() => { useEffect(() => {
if (editorViewRef.current) { if (editorViewRef.current) {
const currentEditorText = editorViewRef.current.state.sliceDoc();
if (currentEditorText !== text) {
editorViewRef.current.setState(buildEditorState()); editorViewRef.current.setState(buildEditorState());
editorViewRef.current.dispatch({ editorViewRef.current.dispatch({
selection: { anchor: text.length }, selection: { anchor: text.length },
}); });
} }
}
}, [text, vimMode]); }, [text, vimMode]);
useEffect(() => { useEffect(() => {