-
Notifications
You must be signed in to change notification settings - Fork 17
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
Selected text is invisible on Cursor (an editor based on VS Code) #141
Comments
Thanks for the lovely feedback. Well, it is super strange, because blockman boxes have z-index about I inspected the elements with |
Honestly, I wouldn't know how to modify your extension to make it work on Cursor (I don't know how to code extensions!) But I somewhat randomly found a workaround, I don't know exactly why it works 😅 It was thanks to this comment microsoft/vscode#21898 (comment)
/*### Selection.Common ###*/
/* prevents border overlap */
/* `height` value might need to be changed to suit your font settings. */
.cdr.selectionHighlight,
.cslr.selected-text{
height: 17px !important;
}
/* hides extraneous leading/trailing selection edges. */
/* `width` value might need to be changed to suit your font settings. */
/* potentially could require additional workarounds if additional artifacts show up in specific contexts, or if it unintendedly affects selections that should be visible (single characters, etc.). */
:is(
.cdr.selectionHighlight,
.cslr.selected-text
)[style*="width:10px"]{
display: none !important;
}
/*### Selection.Matches ###*/
.cdr.selectionHighlight{
border: 1px solid hsla(334, 100%, 60%, 45%) !important;
border-radius: 4px !important;
}
/*### Selection.Active ###*/
/* inactive pane. */
.cslr.selected-text{
background-color: hsla(217, 50%, 58%, 20%) !important;
border: 1px solid hsla(217, 60%, 70%, 50%) !important;
border-radius: 4px !important;
pointer-events: none !important;
z-index: 5;
}
/* active pane. */
.monaco-editor.focused .cslr.selected-text{
background-color: hsla(217, 76%, 63%, 50%) !important;
border: 1px solid hsla(217, 100%, 60%, 78%) !important;
border-radius: 4px !important;
opacity: 0.65 !important;
mix-blend-mode: plus-lighter !important;
} |
I guess, we are not able to fix this issue by modifying the extension itself, because vscode extension api is very limited and does not give us much permissions. your workaround seems good, well, maybe it's not the best thing to modify vscode styles forcefully (unofficial way) like that, but I guess it's fine temporarily. Actually I think we should inform this issue to the Cursor team as a bug and hope that they will fix it on their own. |
When using Blockman on Cursor, which is a fork of VS Code, we can't see the box containing the text selection.
For example, here is Cursor with Blockman turned off. While I'm not selecting anything, the editor looks like this:
If I activate Blockman, it looks like this:
When I try to select text anywhere:
I know that this is an extension for VS Code, but I thought that maybe you knew a simple solution/setting value for Blockman to also work on Cursor.
Thank you for this great extension!
The text was updated successfully, but these errors were encountered: