[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  mismatch between ansi codes and style runs at EOL
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

mismatch between ansi codes and style runs at EOL

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Sun 18 Dec 2016 02:58 AM (UTC)

Amended on Sun 18 Dec 2016 03:01 AM (UTC) by Fiendish

Message
It seems like it's not possible for style runs to have colored but empty styles (or, I'm guessing, vice versa?).
If the server sends "COLOR1 text COLOR2 text COLOR3" on a line, the third color gets lost when you try to work on the capture using style runs.
Any chance of getting empty colors added, or of getting raw ansi data passed to match functions? They affect the subsequent line.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 18 Dec 2016 03:18 AM (UTC)
Message
Maybe you are referring to this:


// adds text to a line, adds to current style run if possible
void CPaneLine::AddStyle (const CPaneStyle style)
    {
    // don't need to if no text in style  (maybe)
    if (style.m_sText.empty ())
      return;
...


paneline.cpp

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #2 on Sun 18 Dec 2016 03:35 AM (UTC)

Amended on Sun 18 Dec 2016 03:36 AM (UTC) by Fiendish

Message
Looks about right. How do you feel about optionally definitely maybeing? :)

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #3 on Mon 19 Dec 2016 12:46 AM (UTC)

Amended on Mon 19 Dec 2016 02:00 AM (UTC) by Fiendish

Message
Proposed.
https://github.com/nickgammon/mushclient/pull/28

I'm finding this to be a critical missing piece of trying to Simulate captured lines that are supposed to color bleed.
I don't know if this has no side effects, whereas passing a new raw ansi data field to the trigger scripts would be guaranteed free of side effects, but it seems to be working fine for me so far.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Mon 19 Dec 2016 03:43 AM (UTC)
Message
You've tested it then?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #5 on Mon 19 Dec 2016 12:55 PM (UTC)
Message
I've been testing since last night. It fixes my problem and doesn't seem to introduce new ones. I'm willing to bet that noone will ever loop through styles in a way that cares whether the last one has no text in it. At worst someone will have a final empty ColourTell, which is basically a noop.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Mon 19 Dec 2016 10:19 PM (UTC)
Message
I think I found an empty style run anyway during some other testing so it probably doesn't matter much. I've merged your commit.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,926 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]