Display of tabulator chars in Mudlet
Display of tabulator chars in Mudlet
Hi all, I found a weird problem. It seems like Mudlet sometimes can't display tabulator chars very well. I have made a few screenshots to illustrate an example which I can reproduce easily. (This example uses the "Activate Time Stamps" button in the bottom of the Mudlet window) The effect is hard to describe for me, because I don't often see overlapping letters or characters in text, and also interesting things happen, when I try and select some of the text with the mouse. If you have any questions, I will be happy to provide more info and/or test some more things. Hope this can be fixed some time!
Re: Display of tabulator chars in Mudlet
The problem, which from what I understand will be fixed in the next release, relates to how Mudlet handles tab characters in lines of text that contain color codes. The result is the overwritten characters that you see. To fix the problem for now, you can create a trigger to replace the tabs with spaces. Use \t as the trigger pattern. What you do to replace the tabs is up to you, but here is some simple code you could use to get you started:
It basically just replaces all tab characters with 8 spaces.
Re: Display of tabulator chars in Mudlet
Thanks for the suggested trigger. It sounds nice in theory, unfortunately does not seem to improve much, quite the opposite.Jor'Mox wrote:It basically just replaces all tab characters with 8 spaces.
edit: After replacing your %t with \t the trigger seems to do the job!
Re: Display of tabulator chars in Mudlet
Those seem to be some very strangely placed tab characters. You might try just replacing them with an empty string, "". It would certainly clean things up a bit.
Re: Display of tabulator chars in Mudlet
I edited my post afterwards. Your original trigger seems to replace every letter T with the spaces. When I change your pattern "%t" with "\t", it works as expected. Thanks!
My trigger now: start on perl regex: \t
My trigger now: start on perl regex: \t
Code: Select all
line = string.gsub(line,"\t",string.rep(" ",8))
selectCurrentLine()
replace(line)
line = getCurrentLine()
Last edited by Zaphob on Sun Nov 03, 2013 6:06 pm, edited 1 time in total.
Re: Display of tabulator chars in Mudlet
That is what I get for just throwing something together and not testing it.