Mudlet / Mudlet

⚔️ A cross-platform, open source, and super fast MUD client with scripting in Lua
https://mudlet.org
GNU General Public License v2.0
732 stars 266 forks source link

echoLink clickable rectangle not consistent if timestamps on #6365

Closed atari2600tim closed 1 year ago

atari2600tim commented 2 years ago

Brief summary of issue / Description of requested feature:

If you print a line with echoLink and have timestamps turned on, and print it on a line that doesn't have a timestamp, then it prints to the left and the clickable link box is to the right.

Steps to reproduce the issue / Reasons for adding feature:

  1. Open a profile and have timestamps off.
  2. Try lua echoLink("this is a plain echoLink line\n", function() echo("hmm\n") end, "hint")
  3. With timestamps turned off, click the first and last letter, both work
  4. Turn timestamps on.
  5. With timestamps on, click the first and last letter. Anything before "i" in "plain" is in the timestamp zone and will highlight the whole line. The clickable box will be at an offset to the right of visible text, so you can also click in the rectangle after it.
  6. Make a trigger for some game output and have it run the same code, then have the game send you text to trigger it.
  7. This time clickable box is in proper location because your text will print on same line as game output and thus has timestamp indention on it.

Error output / Expected result of feature

Extra information, such as the Mudlet version, operating system and ideas for how to solve / implement:

I don't know what an ideal experience would be. Maybe have special logic for the clickable box location to be aware of the presence or lack of indent. Maybe keep the box as it is but have the printed echos and game input and stuff all be indented just like game output is.

atari2600tim commented 1 year ago

Later after reading the Discord and seeing talk about highlighting the initial messages being off, I realized that timestamps normally show up on every line on release version instead of just incoming messages.

This changed between 2022-09-01-42d5a and 2022-09-02-e82a2

atari2600tim commented 1 year ago

Clickable zone is correct both ways after timestamps were fixed in #6423