-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Transparant cursor line turns completely black after using another plugin #68
Comments
Actually, the whole problem seems to be that comparePlus wipes out the caret line's alpha channel when switching back to the normal view: The call to With CSVLint installed alongside, comparePlus detects the caret line color as Later, when setting up the compare view, the alpha channel gets put back into the top 8 bits: The CSVLint/CSVLintNppPlugin/PluginInfrastructure/Lexer.cs Lines 461 to 462 in 2b4d239
A few options to consider:
diff --git a/src/NppHelpers.cpp b/src/NppHelpers.cpp
index c8f468b..e46035c 100644
--- a/src/NppHelpers.cpp
+++ b/src/NppHelpers.cpp
@@ -374,11 +374,12 @@ void setNormalView(int view)
CallScintilla(view, SCI_SETMARGINSENSITIVEN, MARGIN_NUM, false);
const intptr_t caretLineColor = CallScintilla(view, SCI_GETELEMENTCOLOUR, SC_ELEMENT_CARET_LINE_BACK, 0);
+ const intptr_t caretLineColorAlpha = (caretLineColor & 0xFFFFFF) | (0x28 << 24);
if (caretLineColor)
- CallScintilla(view, SCI_SETELEMENTCOLOUR, SC_ELEMENT_CARET_LINE_BACK, caretLineColor & 0xFFFFFF);
+ CallScintilla(view, SCI_SETELEMENTCOLOUR, SC_ELEMENT_CARET_LINE_BACK, caretLineColorAlpha);
- CallScintilla(view, SCI_SETCARETLINELAYER, SC_LAYER_BASE, 0);
+ CallScintilla(view, SCI_SETCARETLINELAYER, SC_LAYER_UNDER_TEXT, 0);
CallScintilla(view, SCI_SETELEMENTCOLOUR, SC_ELEMENT_HIDDEN_LINE, hiddenLinesColor[view]);
}
Footnotes
|
I'm inclined to try updating this plugin to the new element style APIs and see if that solves the problem with ComparePlus. I'll work on a PR today. |
Actually they are! See ScintillaGateway.cs. Unfortunately, it's not as straightforward a fix as I had hoped. Calling |
The more I think about this, the more I wonder if maybe the easiest "solution" (really patch I suppose) is just to change the default for the |
As @carlos-esteves pointed out in issue #73 -> When the cursor line is all black after using the Compare plugin, you can open the CSV Lint settings form and then close it to reset the black cursor line back to transparent. I don't have the time to work on the CSV Lint plug-in at the moment, so this is at least a workaround for now (albeit clunky) |
When the cursor line is set to transparant, it turns completely black after using another plugin making the text at the cursor and selected line unreadable. User has to restart Notepad++ to make it transparant again.
CSV Lint
and theCompare Plugin v2
Transparent cursor = true
New 1
andNew 2
Language > CSVLint
After the last step the Notepad++ cursor line will be all black, see screenshots below. afaik the error is not due to Compare Plugin v2 but that's just an easy way to trigger this,
The text was updated successfully, but these errors were encountered: