Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection on currently line is not visible #609

Open
trusktr opened this issue Nov 25, 2023 · 7 comments
Open

selection on currently line is not visible #609

trusktr opened this issue Nov 25, 2023 · 7 comments

Comments

@trusktr
Copy link

trusktr commented Nov 25, 2023

Hello! I get the same problem with these themes as here:

vadimdemedes/thememirror#8 (comment)

I cannot see the selection on the current line.

Is it related to that update that @marijnh mentioned there?

Here's what I see:

Screen.Recording.2023-11-25.at.3.49.10.AM.mov

(That's the Noctis Lilac theme)

jaywcjlove added a commit that referenced this issue Nov 26, 2023
github-actions bot pushed a commit that referenced this issue Nov 26, 2023
@jaywcjlove
Copy link
Member

@trusktr upgrade v4.21.21, I fixed this bug.

@Danish-Dsouza
Copy link

Danish-Dsouza commented Dec 8, 2023

I am still running into this issue when using bbeditInit or githubLightInit and customizing the lineHighlight property.

here is the relevant output of npm list :

├── @uiw/codemirror-theme-bbedit@4.21.21 ├── @uiw/codemirror-theme-github@4.21.21 ├── @uiw/codemirror-theme-material@4.21.21 ├── @uiw/react-codemirror@4.21.21

@jaywcjlove
Copy link
Member

@Danish-Dsouza It looks like the problem has been solved.

image image image image

@Danish-Dsouza
Copy link

@jaywcjlove Maybe I am doing something wrong. Here is a screenshot of my editor. I have the first instance of single_employee selected, and you can see the match highlights.
Screenshot 2023-12-08 at 2 08 50 PM

Here is my code.

<CodeMirror
      height="auto"
      minHeight="50px"
      theme={bbeditInit({
        settings: {
          fontFamily: 'IBM Plex Mono',
          selection: '#CDE2F2',
          lineHighlight: '#FCFCFC',
          background: '#FFFFFF',
          gutterBackground: '#FFFFFF',
          caret: '#000000',
          gutterActiveForeground: '#000000',
          gutterForeground: '#8D8D8E',
          selectionMatch: '#CDE2F2',
        },
      })} 
// and more stuff unrelated to styling
/>

@jaywcjlove
Copy link
Member

@trusktr lineHighlight must be a semi-transparent color value

https://codesandbox.io/p/sandbox/react-codemirror-example-codemirror-6-forked-cdfh7y?file=%2Fsrc%2FApp.js%3A9%2C29

@jaywcjlove
Copy link
Member

- lineHighlight: '#FCFCFC',
+ lineHighlight: "#c7c7c76e",

@Danish-Dsouza
Copy link

- lineHighlight: '#FCFCFC',

+ lineHighlight: "#c7c7c76e",

D'oh, I will fix it! Thanks for the help and maintaining the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants