Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Ctrl+Shift+B with spaces at ends of Labels
New Topic New Poll Post Reply
Poster Message
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Ctrl+Shift+B with spaces at ends of Labels (+2)  
I'm running the latest release build (I'm running 3.2.0.83), but I searched the board for similar topics and I looked though the changelog for 3.2.1, and I did not find that the latest debug build addresses this issue.

I found that when parsing text pasted with Ctrl+Shift+B, DROD conveniently trims spaces between tokens. In most cases, this is good, because it allows the user to organize their code and line stuff up with whitespace.

But this behavior results in a little quirk when it comes to Labels, which can have spaces at the beginning and end. These spaces are included when you copy with Ctrl+B, but are removed when you paste back with Ctrl+Shift+B. Using Ctrl+B and Ctrl+Shift+B in sequence on such a label will produce a copy that only differs from the original in leading/trailing spaces; DROD will not add a 0 at the end, because the content of the label is different.

This is particularly bad when a label has just trailing spaces.
Click here to view the secret text


____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 02-08-2010 05:49 AM]
02-07-2010 at 09:06 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
eb0ny
Level: Smiter
Avatar
Rank Points: 484
Registered: 09-12-2007
IP: Logged
icon Re: Ctrl+Shift+B with spaces at ends of Labels (0)  
If you have labels, whose names begin and/or end with space characters, you are doing it wrong in the first place.

Just sayin'.

____________________________
Click here to view the secret text

02-08-2010 at 09:48 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Ctrl+Shift+B with spaces at ends of Labels (0)  
eb0ny wrote: If you have labels, whose names begin and/or end with space characters, you are doing it wrong in the first place.
So true, so true.

I'm going to highlight leading/trailing spaces as errors.
EDIT: XD
I forgot that I removed the bit in my first post about the syntax highlighter I'm working on.


____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 02-08-2010 10:24 PM]
02-08-2010 at 10:15 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5166
Registered: 02-04-2003
IP: Logged
icon Re: Ctrl+Shift+B with spaces at ends of Labels (0)  
Kwakstur wrote:
I'm running the latest release build (I'm running 3.2.0.83), but I searched the board for similar topics and I looked though the changelog for 3.2.1, and I did not find that the latest debug build addresses this issue.

I found that when parsing text pasted with Ctrl+Shift+B, DROD conveniently trims spaces between tokens. In most cases, this is good, because it allows the user to organize their code and line stuff up with whitespace.

But this behavior results in a little quirk when it comes to Labels, which can have spaces at the beginning and end. These spaces are included when you copy with Ctrl+B, but are removed when you paste back with Ctrl+Shift+B. Using Ctrl+B and Ctrl+Shift+B in sequence on such a label will produce a copy that only differs from the original in leading/trailing spaces; DROD will not add a 0 at the end, because the content of the label is different.

This is particularly bad when a label has just trailing spaces.
Thanks for reporting this. I'm fixing this oversight in 3.3 (and DROD RPG) so that when a label command is added, any trailing whitespace is stripped.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-03-2011 at 11:13 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Ctrl+Shift+B with spaces at ends of Labels
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.