Bug #5495
closedEditbox won't show modified text (bold, italics, etc)
0%
Description
Instead of showing the text in the Editbox the same as it will appear in the message when it's sent, AdiIRC shows text in the Editbox with some whitespace padding around it, making it impossible to determine at a glance what modifiers you have actually used.
"Typing in bold" becomes " Typing in bold " in the Editbox, but displays correctly as "*Typing in Bold*" in Messages. And the same goes for the other modifiers.
This is with all BBcode options being enabled, of course.
Updated by Per Amundsen over 2 years ago
- Status changed from New to Invalid
This is expected since the windows control adiirc uses for input does not support mirc control codes. The control codes are not valid characters so they don't have a representation in fonts, they are rendered by the windows control in various ways such as a square or a wide space.
You will see the same result as copy/pasting the text into notepad.
Updated by Myles D over 2 years ago
Can we make it into a feature request then? Is this feasible? The Editbox breaking on text modifiers is really a bummer.
Updated by Per Amundsen over 2 years ago
Unfortunately is not possible to modify how characters are drawn in the windows control, also to my knowledge, no irc client can do this.
Updated by Myles D over 2 years ago
Miranda NG can do it, which I had been using before AdiIRC.
Updated by Myles D over 2 years ago
Looks like HexChat can also do some of it, it seems to do italics and underline ok but bold displays a system character. Maybe there's some inspiration in either of these clients' codebases.
Updated by Per Amundsen over 2 years ago
I see, it might have made it's own input control from scratch.
If you are looking for an alternative to miranda that can do this, maybe check some of the web clients such as https://www.irccloud.com, https://kiwiirc.com, https://thelounge.chat, maybe one of them can.
Updated by Myles D over 2 years ago
Thanks but I'm happy using AdiIRC or Miranda.
Another option that occured to me:
Having AdiIRC display [b][/b], [u][/u] etc. instead of the whitespaces.
That would also improve readability and it's still simple text.
Updated by Per Amundsen over 2 years ago
You can try copy/paste this script into the Script Editor, it's not very elegant but might work for your case.
Basically, it inserts [b], [i], [u] into the Editbox when using the ctrl+b, ctrl+i, ctrl+u shortcuts, it also inserts [/b], [/i], [/u] when using the ctrl+shift+b, ctrl+shift+i, ctrl+shift+u shortcuts.
When you press enter, it replaces the [b], [i], [u] and [/b], [/i], [/u] text with the correct control code characters before sending the text.
on *:INPUT:*:{ if (/* iswm $1) { return } say $replace($1-, [b], $chr(2), [/b], $chr(2), [i], $chr(29), [/i], $chr(29), [u], $chr(31), [/u], $chr(31)) halt } on *:KEYDOWN:*:66,73,85:{ if ($mouse.key == 2) { ; ctrl + b/i/u if ($keyval == 66) { editbox -i [b] } else if ($keyval == 73) { editbox -i [i] } else if ($keyval == 85) { editbox -i [u] } halt } else if ($mouse.key == 6) { ; ctrl + shift + b/i/u if ($keyval == 66) { editbox -i [/b] } else if ($keyval == 73) { editbox -i [/i] } else if ($keyval == 85) { editbox -i [/u] } halt } }