The cursor was placed after the rejected input, both to indicate where
the mistake was, and to make it easy to <backspace> it out. But since
"retry" is only used when there are trailing words, that means the
cursor would be placed on the space between the mistake and the trailing
input. By putting it at the first character of the rejected input, it
is less visually ambiguous. The user can now use <delete> instead of
<backspace>.
Similar to the previous commit to plugins/users, with the additional
change of dynamically sizing the username column.
I believe this is the last place where GAIN/LOSE was displayed to end
users.
Shaves 7 characters off for most lines, and gets rid of infamous
GAIN/LOSE display.
The terms "GAIN" and "LOSE" were originally introduced because having
negative numbers everywhere would look too, er, negative, and having a
"+" for positive numbers would get hard to notice in a right aligned
list. The visibility of the "+" was fixed a while ago, simply by adding
a space between the sign and the number, and now the same style is
applied to the user log view.
Old:
2023-07-05 06:24:54 LOSE 2 1.80 Example [2x 0.90]
2023-07-07 20:55:53 GAIN 1 20.00 Received from someone (example)
New:
2023-07-05 06:24:54 1.80 2x Example [2x 0.90]
2023-07-07 20:55:53 + 20.00 Received from someone (example)
When asked to fix the bug, it came up with a different regex, which
would completely change what's valid and what's not, so that's totally
wrong:
/^\s*(-)?([0-9]+)(?:[,.]([0-9]{1,2}))?\s*$/
When asked to fix it in another way, without changing the regex, it
suggested stripping the sign completely, which is even more wrong.
So I fixed it myself :)
When there were several matches that shared the same common prefix, but
with a different case, readline would eat the input from the case
sensitive longest common prefix up to where the case began to differ.
e.g. when "ibutton" and "iButton-touwtje" were available, typing
"ibu<tab>" would truncate the input to just "i" and on second tab show
both matches, but without ever completing beyond the "i".