Skip to content

Commit

Permalink
Fix duplicate text selection issue (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
choidabom authored and minai621 committed Nov 5, 2024
1 parent 6f61a37 commit e9a47c0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
27 changes: 27 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@sentry/react": "^7.99.0",
"@swc/helpers": "^0.5.3",
"@tanstack/react-query": "^5.17.15",
"@uiw/codemirror-extensions-basic-setup": "^4.23.2",
"@uiw/codemirror-theme-xcode": "^4.21.21",
"@uiw/codemirror-themes": "^4.21.21",
"@uiw/react-markdown-preview": "^5.0.7",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { markdown } from "@codemirror/lang-markdown";
import { EditorState } from "@codemirror/state";
import { keymap } from "@codemirror/view";
import { Vim, vim } from "@replit/codemirror-vim";
import { basicSetup } from "@uiw/codemirror-extensions-basic-setup";
import { xcodeDark, xcodeLight } from "@uiw/codemirror-theme-xcode";
import { basicSetup, EditorView } from "codemirror";
import { EditorView } from "codemirror";
import { useCallback, useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { ScrollSyncPane } from "react-scroll-sync";
Expand Down Expand Up @@ -73,7 +74,7 @@ function Editor(props: EditorProps) {
doc: editorStore.doc.getRoot().content?.toString() ?? "",
extensions: [
keymap.of(setKeymapConfig()),
basicSetup,
basicSetup({ highlightSelectionMatches: false }),
markdown(),
configStore.codeKey === CodeKeyType.VIM ? vim() : [],
themeMode == "light" ? xcodeLight : xcodeDark,
Expand Down

0 comments on commit e9a47c0

Please sign in to comment.