diff --git a/components/block.tsx b/components/block.tsx index c714034..7dc5b53 100644 --- a/components/block.tsx +++ b/components/block.tsx @@ -428,9 +428,7 @@ function PureBlock({
-
- {document?.title ?? block.title} -
+
{block.title}
{isContentDirty ? (
diff --git a/components/code-editor.tsx b/components/code-editor.tsx index 877219c..e54fa11 100644 --- a/components/code-editor.tsx +++ b/components/code-editor.tsx @@ -59,9 +59,12 @@ function PureCodeEditor({ content, saveContent, status }: EditorProps) { } }); + const currentSelection = editorRef.current.state.selection; + const newState = EditorState.create({ doc: editorRef.current.state.doc, extensions: [basicSetup, python(), oneDark, updateListener], + selection: currentSelection, }); editorRef.current.setState(newState); diff --git a/components/document-preview.tsx b/components/document-preview.tsx index 29d6411..e0fe907 100644 --- a/components/document-preview.tsx +++ b/components/document-preview.tsx @@ -145,6 +145,7 @@ const PureHitboxLayer = ({ ? { ...block, isVisible: true } : { ...block, + title: result.title, documentId: result.id, kind: result.kind, isVisible: true,