Skip to content

Commit

Permalink
fix: Set the value of crosshairCursor to false by default. (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 21, 2023
1 parent ebe585e commit 7a93b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion extensions/basic-setup/src/index.ts
Expand Up @@ -92,6 +92,8 @@ and an array literal), copy it into your own code, and adjust it
as desired.
*/
export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {
const { crosshairCursor: initCrosshairCursor = false } = options;

let keymaps: KeyBinding[] = [];
if (options.closeBracketsKeymap !== false) {
keymaps = keymaps.concat(closeBracketsKeymap);
Expand Down Expand Up @@ -130,7 +132,7 @@ export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {
if (options.closeBrackets !== false) extensions.push(closeBrackets());
if (options.autocompletion !== false) extensions.push(autocompletion());
if (options.rectangularSelection !== false) extensions.push(rectangularSelection());
if (options.crosshairCursor !== false) extensions.push(crosshairCursor());
if (initCrosshairCursor !== false) extensions.push(crosshairCursor());
if (options.highlightActiveLine !== false) extensions.push(highlightActiveLine());
if (options.highlightSelectionMatches !== false) extensions.push(highlightSelectionMatches());
if (options.tabSize && typeof options.tabSize === 'number')
Expand Down
2 changes: 1 addition & 1 deletion www/src/pages/theme/Preview.tsx
@@ -1,4 +1,4 @@
import { FC, Children, PropsWithChildren, cloneElement, useState } from 'react';
import { FC, PropsWithChildren, useState } from 'react';
import styled from 'styled-components';
import Npm from '@uiw/react-shields/npm';
import { useMdData } from '../../components/useMdData';
Expand Down

0 comments on commit 7a93b3e

Please sign in to comment.