Blank spaces in an echo before text in trigger context are stripped

Bug #1225591 reported by Vadim Peretokin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mudlet
Fix Released
Medium
Chris

Bug Description

Steps to reproduce:

make a new trigger

put echo("\n hi\n hi") into it

output will be:

You see exits leading northeast, east (open door), west (open door), northwest, up, and down.
hi
hi

Blank spaces before text in the echo are being stripped, and this is an undesirable modification - it breaks a lot of alignment in echoes.

This is on current in git only and not 2.1.

Revision history for this message
Heiko (koehnheiko) wrote : Re: [Mudlet-makers] [Bug 1225591] [NEW] Blank spaces in an echo before text in trigger context are stripped

The reason is that people wanted Mudlet to skip leading spaces when
lines are being wrapped -> some Achaea help text was unaligned and
people claimed that all other clients wrap without leading spaces.
As echo(" 1\n 2\n") wraps the line after the first \n, this is the
direct consequence.

Am 15.09.2013 07:54, schrieb Vadim Peretokin:
> Public bug reported:
>
> Steps to reproduce:
>
> make a new trigger
>
> put echo("\n hi\n hi") into it
>
> output will be:
>
> You see exits leading northeast, east (open door), west (open door), northwest, up, and down.
> hi
> hi
>
> Blank spaces before text in the echo are being stripped, and this is an
> undesirable modification - it breaks a lot of alignment in echoes.
>
> This is on current in git only and not 2.1.
>
> ** Affects: mudlet
> Importance: Medium
> Status: Confirmed
>

Revision history for this message
Heiko (koehnheiko) wrote :

There's only one type of wrapping in Mudlet and this applies to everything.

Am 15.09.2013 12:38, schrieb Vadim Peretokin:
> Are you sure this didn't relate to Mudlets word wrapping of the MUDs
> text?
>
> I think that is what was the intention - when there is a long line and text
> is wrapped, spaces before it should be deleted. But it should not affect
> any of the scripting API. I remember now the issue was with help indexes -
> those do indeed look proper, now:
>
> CITY OF MHALDOR
>
> ambassador arenaevents behaviour bloodfeuds
> bounties
> branding catalogue citydirections cityfavours
> citylaws
> cityrepair combattournament creditsales dragons
> eidolons
>
> Whereas before it looked like:
>
> CITY OF MHALDOR
>
> ambassador arenaevents behaviour bloodfeuds
> bounties
> branding catalogue citydirections
> cityfavours citylaws
> cityrepair combattournament creditsales dragons
> eidolons
>
> However this was not intended to affect the API and should not!
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Mudlet-makers] [Bug 1225591] [NEW] Blank spaces in an echo before text in trigger context are stripped

I think there is a misunderstanding. I'll investigate this.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Are you sure this didn't relate to Mudlets word wrapping of the MUDs text?

I think that is what was the intention - when there is a long line and text
is wrapped, spaces before it should be deleted. But it should not affect
any of the scripting API. I remember now the issue was with help indexes -
those do indeed look proper, now:

CITY OF MHALDOR

ambassador arenaevents behaviour bloodfeuds
bounties
branding catalogue citydirections cityfavours
 citylaws
cityrepair combattournament creditsales dragons
 eidolons

Whereas before it looked like:

CITY OF MHALDOR

ambassador arenaevents behaviour bloodfeuds
bounties
         branding catalogue citydirections
cityfavours citylaws
    cityrepair combattournament creditsales dragons
     eidolons

However this was not intended to affect the API and should not!

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Then the behaviour is undesirable as it breaks echoes and causes more
trouble than it is worth, unfortunately. This side-effect is not good.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

I'd recommend reverting these changes unless this can be rectified. It's not worth the issues it causes in the current manner.

Revision history for this message
Chris (chrismudlet) wrote :

I'd agree this is a bug -- text from the game should follow the remove spaces wrapping. Text echo'd should not (unless that echo itself is wrapped).

Revision history for this message
Chris (chrismudlet) wrote :

Fixed in mudlet/development

Changed in mudlet:
assignee: nobody → Chris (chrismudlet)
status: Confirmed → Fix Committed
Revision history for this message
Heiko (koehnheiko) wrote : Re: [Mudlet-makers] [Bug 1225591] Re: Blank spaces in an echo before text in trigger context are stripped

careful guys, this is not a bug but intentional behavior -> git changes
post 2.1

Am 27.01.2014 02:03, schrieb Chris:
> Fixed in mudlet/development
>
> ** Changed in: mudlet
> Status: Confirmed => Fix Committed
>
> ** Changed in: mudlet
> Assignee: (unassigned) => Chris (chrismudlet)
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Mudlet-makers] [Bug 1225591] Re: Blank spaces in an echo before text in trigger context are stripped

What happened was that your bugfix introduced a side-effect, the
side-effect being more undesirable than the original problem as mentioned
earlier - but Chris' solution now fixes both the original problem and
doesn't introduce the side-effect.

Changed in mudlet:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.