[wheybags] [0.17.4] Color format counts as string

Things that we don't consider worth fixing at this moment.
Roang
Inserter
Inserter
Posts: 27
Joined: Tue Aug 22, 2017 12:38 pm
Contact:

[wheybags] [0.17.4] Color format counts as string

Post by Roang »

What did you do?
I added colour to a train station name and deleted the string.
Station name - empty - edit.png
Station name - empty - edit.png (21.84 KiB) Viewed 1446 times
What happened?
I could name the station with an empty (no symbols shown) string.
Station name - empty - gui.png
Station name - empty - gui.png (25.44 KiB) Viewed 1446 times
What did you expect to happen instead?
There should be a warning that a station name cannot be empty
Warning
Warning
Station name - empty - edit.png (15.01 KiB) Viewed 1446 times
User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

Re: [wheybags] [0.17.4] Color format counts as string

Post by wheybags »

Thanks for the report.
In the next version, you will be forced to close color tags, so to replicate this you would have to do something that makes no sense - start and end a color tag without putting any text in between, eg:

Code: Select all

[color=red][/color]
Whenever you use backspace, the string is cleaned up after the deletion, so eg if you had:

Code: Select all

123[color=red]a[/color]
with your cursor after the a, then hit backspace, the empty color tag will be removed.

Disallowing this case would be awkward, as it would probably imply running the cleanup code after every insertion of text too.
The difference is, you can generate empty sections like this with backspace by doing something quite sensible and normal, but to make an empty section with insertion you kinda have to really try.
For that reason, I don't think it's worth it, so I will put this bug in "Won't fix" for now.
Post Reply

Return to “Won't fix.”