Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${cutscr mess with ${color} #1264

Open
pascalpoitras opened this Issue Oct 9, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@pascalpoitras
Copy link

pascalpoitras commented Oct 9, 2018

Bug summary

If I put, for example, ${color:31}+ in the second field of ${cutscr, it works great

/eval -n ${cutscr:2,${color:31}+,hello}

this return he+ as expected

However, if I add a background color, ${cutscr start to cut the color somehow:

/eval -n ${cutscr:2,${color:31,32}+,hello}

this return @0 instead of he+

Additional information

I have only tested ${cut and ${cutscr


  • WeeChat version: WeeChat 2.3-dev (git: v2.2-112-g82697714e)
  • OS, distribution and version: Debian Stable Stretch
@flashcode

This comment has been minimized.

Copy link
Member

flashcode commented Oct 9, 2018

The problem is that the comma is used as separator between count, suffix and string, and that ${color:31,32} is adding a comma.
Not easy to fix, I'm thinking about a way to use another separator (keeping the comma by default for compatibility).

@flashcode flashcode self-assigned this Oct 9, 2018

@flashcode

This comment has been minimized.

Copy link
Member

flashcode commented Oct 9, 2018

There's a workaround which is working: /eval -n ${cutscr:2,${color:31}${color:,32}+,hello}

@pascalpoitras

This comment has been minimized.

Copy link
Author

pascalpoitras commented Oct 9, 2018

thanks!

@flashcode flashcode added this to the 2.4 milestone Oct 13, 2018

@flashcode flashcode modified the milestones: 2.4, 2.5 Jan 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.