@P-A hasn’t come back since my reply. But I had a few minutes to experiment.
Using the published v8.9.2, I could replicate the problem:
Open fresh v8.9.2
Language > User Defined Language > Define your language…
Folding in code 2 style:
open = openfold,
close = closefold
Save as… = SomethingNew
open disappears, but
close remains
Exit and restart Notepad++
Language > User Defined Language > Define your language…, choose
UserLanguage: SomethingNew
Folding in code 2 style> open still missing, but
close remains
Add again
open = openfold, and close the UDL dialog: it appears to be there, but repeating 6/7 will show back in condition 8 at this point.
But, when I try the same sequence with the bugfix version from PR#17522, it works as expected (openfold doesn’t go missing at all).
That PR will be part of v8.9.3 Release Candidate, expected Mar 14. So it looks to me like the bug has already been fixed.