Skip to content

Commit 7a93b3e

Browse files
committedSep 21, 2023
fix: Set the value of crosshairCursor to false by default. (#568)
1 parent ebe585e commit 7a93b3e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎extensions/basic-setup/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ and an array literal), copy it into your own code, and adjust it
9292
as desired.
9393
*/
9494
export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {
95+
const { crosshairCursor: initCrosshairCursor = false } = options;
96+
9597
let keymaps: KeyBinding[] = [];
9698
if (options.closeBracketsKeymap !== false) {
9799
keymaps = keymaps.concat(closeBracketsKeymap);
@@ -130,7 +132,7 @@ export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {
130132
if (options.closeBrackets !== false) extensions.push(closeBrackets());
131133
if (options.autocompletion !== false) extensions.push(autocompletion());
132134
if (options.rectangularSelection !== false) extensions.push(rectangularSelection());
133-
if (options.crosshairCursor !== false) extensions.push(crosshairCursor());
135+
if (initCrosshairCursor !== false) extensions.push(crosshairCursor());
134136
if (options.highlightActiveLine !== false) extensions.push(highlightActiveLine());
135137
if (options.highlightSelectionMatches !== false) extensions.push(highlightSelectionMatches());
136138
if (options.tabSize && typeof options.tabSize === 'number')

‎www/src/pages/theme/Preview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FC, Children, PropsWithChildren, cloneElement, useState } from 'react';
1+
import { FC, PropsWithChildren, useState } from 'react';
22
import styled from 'styled-components';
33
import Npm from '@uiw/react-shields/npm';
44
import { useMdData } from '../../components/useMdData';

0 commit comments

Comments
 (0)
Please sign in to comment.