notepad++ 7.9.5 problem

Scripting and setups with Notepad++ and AutoHotkey.
User avatar
PuzzledGreatly
Posts: 1089
Joined: 29 Sep 2013, 22:18

notepad++ 7.9.5 problem

Post by PuzzledGreatly » 18 Apr 2021, 23:50

Is anyone using notepad version 7.9.5 to write ahk scripts? If so, have you had any problem with the colour scheme changing. I find that after making an edit everything below my edit point will change red (the color used to indicate text inside quotes). This happens when the cursor is no where near an element of text in quotes. After it happens the only way to restore the colour scheme is to close and reopen notepad++. I've noticed this behaviour for the last few versions of notepad++ but recently it has gotten worse. Could it be my userDefineLang_AHK.xml file has gotten corrupt? For users of notepad++ what xml file do you use for language? Thanks.

User avatar
jNizM
Posts: 2716
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: notepad++ 7.9.5 problem

Post by jNizM » 19 Apr 2021, 01:20

Same here. It's a bug in npp since a few versions.
You can also click on Language -> AutoHotkey to fix this temporary.
[AHK] 1.1.33.08 x64 Unicode (2.0-a133) | [WIN] 10 Pro (Version 20H2) x64 | [GitHub] Profile
Donations are appreciated if I could help you

Rohwedder
Posts: 4181
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: notepad++ 7.9.5 problem

Post by Rohwedder » 19 Apr 2021, 02:22

Hallo,
ancient problem!
Here (Notepad++ v7.8.9 and already years earlier) it helps to comment the line before the red block with ;".
A Notepad++ restart is not necessary.

sofista
Posts: 130
Joined: 24 Feb 2020, 13:59

Re: notepad++ 7.9.5 problem

Post by sofista » 19 Apr 2021, 08:53

As I understand it, the issue is due to unbalanced quotation marks. This is not necessarily due to a typo, as the code may require it. Rohwedder's hint solves the issue in a practical way and is the one I usually use.

Now, if you are not happy with that workaround, there is a Python script [https://github.com/Ekopalypse/NppPythonScripts/blob/master/npp/EnhanceAnyLexer.py] that adds extra highlighting to a UDL language using regular expressions that could potentially solve the problem. Caveats: It requires the installation of the Python plugin and can be really slow on large documents.

User avatar
PuzzledGreatly
Posts: 1089
Joined: 29 Sep 2013, 22:18

Re: notepad++ 7.9.5 problem

Post by PuzzledGreatly » 19 Apr 2021, 19:43

Thanks for the replies and alternative solutions to restarting Notepad++.

Post Reply

Return to “Notepad++”