mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[web] Recreate workbench with Overleaf styles (#29651)
GitOrigin-RevId: 52ca336f70b29edf6e39cf95aa164f3ae32c0a79
This commit is contained in:
committed by
Copybot
parent
b1009d3b1f
commit
7b331b0222
@@ -60,6 +60,7 @@ import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-
|
||||
import { SearchQuery } from '@codemirror/search'
|
||||
import { beforeChangeDocEffect } from '@/features/source-editor/extensions/before-change-doc'
|
||||
import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme'
|
||||
import { useEditorSelectionContext } from '@/shared/context/editor-selection-context'
|
||||
|
||||
function useCodeMirrorScope(view: EditorView) {
|
||||
const { fileTreeData } = useFileTreeData()
|
||||
@@ -106,6 +107,8 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
|
||||
const { referenceKeys, searchLocalReferences } = useReferencesContext()
|
||||
|
||||
const { setEditorSelection } = useEditorSelectionContext()
|
||||
|
||||
const ranges = useRangesContext()
|
||||
const threads = useThreadsContext()
|
||||
|
||||
@@ -335,6 +338,7 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
initialSearchQuery: searchQueryRef.current,
|
||||
showBoundary,
|
||||
handleException,
|
||||
setEditorSelection,
|
||||
}),
|
||||
})
|
||||
view.setState(state)
|
||||
@@ -364,7 +368,7 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
}
|
||||
// IMPORTANT: This effect must not depend on anything variable apart from currentDocument,
|
||||
// as the editor state is recreated when the effect runs.
|
||||
}, [view, currentDocument, showBoundary, handleException])
|
||||
}, [view, currentDocument, showBoundary, handleException, setEditorSelection])
|
||||
|
||||
useEffect(() => {
|
||||
if (openDocName) {
|
||||
|
||||
Reference in New Issue
Block a user