Closed Matteo-Nigro closed 1 year ago
Open link is implemented for Markdown, other schemes will need to wait issue #52.
An alternative way to implement color preview is show calltips (change text and background color), open color picker when calltip clicked (similar to VSCode). This seems is easy to implemented than using indicators.
Hello @zufuliu. Great! 😀 It seems to be an interesting solution anyway. Do you think it can be implemented in the next release?
Do you think it can be implemented in the next release?
Not sure, but could do some experiments.
Implemented by 9492cf8afcc34aee3e85d674ac688127a7e282be:
Hi @zufuliu very good, seems to be quite practical. I only report one bug... Upon closer examination I think the problem actually occurs only if the text begins with a color code... as seen in my second screenshot. Regardless of the lexer chosen.
In this case an error is returned which can potentially crash the program. Here is the error message and screenshot of the text that generated it.
The stack overrun is fixed by 98a70ca6985795e8a7e890a802ad55e5af504b47, it caused by: https://github.com/zufuliu/notepad2/blob/98a70ca6985795e8a7e890a802ad55e5af504b47/src/Styles.c#L5348-L5349
That looks good, I'm sure I'll use it! There may perhaps be some advantages in having it only activate when a modifier eg shift is held down whilst passing over but I'm not sure.
shift is held down whilst passing over
I think it would make the feature hard to use (something like "Color Preview" right-click menu).
Hi @zufuliu! I wanted to offer you this implementation... In Notepad3 I find the possibility of opening links directly from the text (Ctrl+Click) and being able to preview the colors (Hex or RGB, etc.) simply by passing the mouse over them, very convenient. When writing code with lots of colors it is especially useful. Talking about the colors with (Ctrl+Click) the window with the color palettes opens... this is also very useful...
What do you think we could work on it? 😉