Ekopalypse / EnhanceAnyLexer

Notepad++ plugin that adds an additional foreground colouring option to existing lexers
MIT License
16 stars 3 forks source link

lines without color in batch file #5

Closed amymor closed 2 years ago

amymor commented 2 years ago

hello, thank you for such a great plugin. but it seems cant color all lines (only a limited amount), here is my settings to colorize lines that start with echo in batch files:

[batch]
0x66BF93 = (?-s)^echo\C.*

and here is example of my problem: https://imgur.com/YKvriTA.png

is there another way to color all lines that start with echo in NPP?

Ekopalypse commented 2 years ago

Thank you for your interest in this plugin. I think I see what the problem is, you are using the word wrap feature, if you disable it I assume it will work then, correct? Nonetheless, this needs to be addressed as it seems it has the potential to leave Npp hanging.

Ekopalypse commented 2 years ago

Can you try the latest version a try? I can't exactly reproduce your problem, mine looks a little different. If the problem still exists with the latest version, would it be possible to get a test file that causes this problem and the complete contents of the EnhanceAnyLexer configuration file? image

amymor commented 2 years ago

thank you for your response yes, i didnt see any problem while word wrap disabled, but i need word wrap. also i noticed that when i press Ctrl+R, the lines become colored, but when i scroll down, the problem occurs again. i will try the latest and report back.

Ekopalypse commented 2 years ago

What does the Ctrl+R do in your case? Does it reload the file?

amymor commented 2 years ago

i tried it, still same problem. here is my complete settings:

[global]
indicator_id=0
debug_mode=0
offset=0
[batch]
0x66BF93 = (?-s)^echo\C.*

also i noticed that color is only applied once when i vertically scrolled or typed/deleted something (Ctrl+R doesnt any effect here), so if i open a small file(without vertical scrollbar) the color is not applied at start and i have to edit it to make the lines colored : https://imgur.com/4r63vNj.gif

amymor commented 2 years ago

What does the Ctrl+R do in your case? Does it reload the file?

yes

Ekopalypse commented 2 years ago

Thanks for the recording - I see what you mean. I will try to fix it today after the "real" work. ;-)

amymor commented 2 years ago

thank you very much

Ekopalypse commented 2 years ago

Can you give this version a try?

amymor commented 2 years ago

thank you, it solved coloring at startup , but still main problem exists when word wrap is enable.

Ekopalypse commented 2 years ago

Are we still talking about the exact same word-wrap issue? The only problem I see at the moment is that when using word-wrap, when you resize the window, the content is not updated until you click back in.

amymor commented 2 years ago

by the main problem, i mean the first problem that i mentioned in the first comment ( only a limited number of lines are colored): https://imgur.com/bH9CLNE.gif i think you tested it in a small file with a few lines, as you can see the problem occurs in a batch file with 170 lines.

Ekopalypse commented 2 years ago

I agree, there is definitely something still wrong.

Ekopalypse commented 2 years ago

I've created an experimental version that should solve the problem, but I am not sure if I want to keep it. I need to test this with my workflow to see if there are performance issues.

amymor commented 2 years ago

I've created an experimental version that should solve the problem, but I am not sure if I want to keep it. I need to test this with my workflow to see if there are performance issues.

thank you very much❤️ it worked fine. i also created a batch file with 100,000 lines and tested it while plugin was enabled, then disabled plugin and tested that batch file again, didnt notice any difference in terms of performance and memory usage.

Ekopalypse commented 2 years ago

Thank you very much for the test. Yes, it seems, at least with my workflow, that the effects are not as bad as I feared. If someone uses a lot of folded lines, the effects are more noticeable, but that's a problem that can occur anyway and can't really be solved with the current way of determining matches.

Ekopalypse commented 2 years ago

No problems\delays had occurred since the calculation of the visual area was expanded, so this calculation will be retained.