Comments (9)
Thank you for this detailed bug report!
Notepad++ uses an updated version of Scintilla starting from Notepad++ 8.4. It also affected the plugins that were not recently updated:
https://community.notepad-plus-plus.org/topic/23079/eventual-bugs-in-plugins-with-notepad-v8-4-x
This may explain why 8.3.3 is still OK.
I tried the same script
sci_sendmsg SCI_SETSELFORE 1 65280
and it everything works for me for both 64-bit and 32-bit Notepad++ 8.4.2.
I noticed you are using a couple of custom plugins: DSpellCheck.dll and NppHorizontalRuler.dll.
Could you try temporary remove both of them and try to reproduce the issue?
If the issue will go away, then you could try to restore one of them to identify which one causes the issue to re-appear.
from nppexec.
The crash is caused by NppHorizontalRuler, assuming it was compiled from this source tree.
It uses the length returned by SCI_GETCURLINE
without adding 1, a necessary correction since Scintilla 5.1.5 shortened the return value of that API.
src/HorizontalRuler.cpp:379: nLineLength = (int)SendMessage(this->scintillaHwnd, SCI_GETCURLINE, 0, 0);
src/HorizontalRuler.cpp:381: nCaret = (int)SendMessage(this->scintillaHwnd, SCI_GETCURLINE, nLineLength, (LPARAM)curLin);
The developer of NppHorizontalRuler should be notfied with a link to notepad-plus-plus/notepad-plus-plus#11766
from nppexec.
Hello,
As suggested by @rdipardo on the bug report of notepad++ I tried a recent development build with only the NppExec plugin installed and no other plugin and it still didn't work as expected.
So when you say "everything works for me for both 64-bit and 32-bit Notepad++ 8.4.2" are you sure that you have at the same time the highlighting of selected text in both tabs like in version 8.3.3 ?
from nppexec.
Only the active view has the selected text in green: i.e. when the primary view is active, its selected text foreground color is green; when the secondary view is active, its selected text foreground color is green.
I believe that starting from Notepad++ 8.4 there are two different options for the foreground color: one for the active foreground color (when the view is active, the one set by SCI_SETSELFORE) and another one for the inactive foreground color (when the view is inactive).
Looking at the Scintilla documentation, probably SCI_SETELEMENTCOLOUR should be used instead of SCI_SETSELFORE.
https://www.scintilla.org/ScintillaDoc.html
Frankly, I'd appreciate if ScintillaDoc mentioned that explicitly (e.g. if there was a clear statement such as "the SCI_SETSELFORE is obsolete; use SCI_SETELEMENTCOLOUR instead").
from nppexec.
https://sourceforge.net/p/scintilla/bugs/2337/
from nppexec.
Well I tried this in Notepad++ 8.4.2 with NppExec 0.8.2 :
SCI_SENDMSG SCI_SETELEMENTCOLOUR 1 65280
And unfortunately it does not work,
SCI_SETSELFORE 1 65280 works the same way as SCI_SENDMSG 2067 1 65280
But SCI_SETELEMENTCOLOUR does not seem to work at all in the intended way.
from nppexec.
This works:
sci_sendmsg SCI_SETELEMENTCOLOUR SC_ELEMENT_SELECTION_TEXT 65280
sci_sendmsg SCI_SETELEMENTCOLOUR SC_ELEMENT_SELECTION_INACTIVE_TEXT 65280
from nppexec.
This works:
sci_sendmsg SCI_SETELEMENTCOLOUR SC_ELEMENT_SELECTION_TEXT 65280 sci_sendmsg SCI_SETELEMENTCOLOUR SC_ELEMENT_SELECTION_INACTIVE_TEXT 65280
There is one catch — you must turn off DirectWrite:
The new APIs were designed to support alpha channels. The officially correct usage is:
SC_ELEMENT_SELECTION_INACTIVE_TEXT : colouralpha
SC_ELEMENT_SELECTION_INACTIVE_BACK : colouralpha
With colouralpha
being specifically a 32-bit value:
Colours are set using the RGBA format (Red, Green, Blue, Alpha). This is similar to colour but with a byte of alpha added. They are combined as: red | (green << 8) | (blue << 16) | (alpha << 24). Fully opaque uses an alpha of 255.
It makes no difference when GDI rendering is active (as per the default), but DirectWrite will read a 24-bit RGB value as having a 0 alpha byte:
An application moving to Direct2D will also obtain the following features:
- [ . . .]
- The ability to support Grayscale text rendering. This correctly populates the destination alpha channel according to both the text brush opacity and the antialiasing of the text.
https://docs.microsoft.com/en-us/windows/win32/direct2d/direct2d-and-directwrite#glyph-rendering
from nppexec.
Thanks a lot to both of you !
The commands you indicated indeed solved my problem ! 👍
I am quite astonished and pleased by your in-depth knowledge of Scintilla, Notepad++ and its plugins ! 🥇
Thanks again for the support !
from nppexec.
Related Issues (20)
- Techniques to restore cursor position within Notepad++ file HOT 2
- SCI_REPLACE has problem matching the beginning of line HOT 6
- Changing N++ themes results in error HOT 4
- Please add support for theme. I am using version 0.8.2 and the console is white. HOT 1
- Ipython does not have auto-indentation and colour for keywords. The same things work fine in normal command prompt. HOT 5
- encoding characters error HOT 2
- CAnyRichEdit::AddStr() is very slow and should be optimized HOT 1
- Search index for online version of NppExec Manual HOT 14
- How to clean HOT 1
- How to clean up/delete the list saved in F6 HOT 1
- [HTML docs] External links are not navigable HOT 4
- There is something wrong with the console output encoding. HOT 2
- How to get current dir name only (not full path) HOT 2
- License? HOT 4
- XBrackets release accidentally added to this repo? HOT 2
- Double clicking line in console output jumps to the first tab ocurrence if you have multiple tabs open with different files of the same name HOT 4
- im trying to compile a qc file and its saying : ERROR:bad or missing options HOT 1
- Issues getting NppExec console to work with Python's getpass module or third party pwinput module HOT 2
- Notepad++ dev build NPP_OPEN fails HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nppexec.