Fixes #422
This commit is contained in:
parent
75aa3171ff
commit
a116b7aadd
@ -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
|
||||||
|
@ -99,10 +99,13 @@ export function MiniEditor(
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (editorViewRef.current) {
|
if (editorViewRef.current) {
|
||||||
editorViewRef.current.setState(buildEditorState());
|
const currentEditorText = editorViewRef.current.state.sliceDoc();
|
||||||
editorViewRef.current.dispatch({
|
if (currentEditorText !== text) {
|
||||||
selection: { anchor: text.length },
|
editorViewRef.current.setState(buildEditorState());
|
||||||
});
|
editorViewRef.current.dispatch({
|
||||||
|
selection: { anchor: text.length },
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [text, vimMode]);
|
}, [text, vimMode]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user