mIRC Home    About    Download    Register    News    Help

Print Thread
Alt+D alias list jump glitch #268466 19/02/21 06:50 PM
Joined: Jan 2004
Posts: 1,510
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,510
Item#3 in:
https://forums.mirc.com/ubbthreads.php/topics/268464/some-things

I agree that the dropdown list of aliases for the remotes tab would also be great.

While the intended behavior is that clicking on an alias name in the menu jumps to that line in the file, there are a few cases where a mis-jump happens, and it continues to happen for all aliases further down in the file.

It appears that the aliases are indexed for the dropdown list by harvesting aliases beginning with a-z, but when an alias doesn't follow the expected structure, it instead jumps to an alias sequentially beneath it, with no respect to alphabetical order.

There may be other cases which causes the dropdown menu to jump to the wrong alias. These cases listed here are based on things from my own aliases files. Other forum members can test their aliases file(s) to see if they have the glitch by scrolling to the bottom of the file until you find the next-to-last alias. If you choose that alias from the dropdown and it doesn't jump the cursor to that location, then you have an alias higher up which causes the glitch. The fastest way to find the problem alias is to play the high-low game. Scroll back to the middle of the alias file, find an alias there and try to jump to it. If you are able to jump to that alias from the dropdown, then there's at least 1 glitched alias below it beneath it. Some glitches you can solve by removing the optional leading slash as described below.

Here are some examples of alias names which cause a dis-connect between the alias's actual location and the line number that gets jumped to when you click on there in the dropdown. These aliases do not appear on the dropdown list, and they alter the jump location when clicking on all alias names physically present at a line number beneath these glitched alias names:

(1) Alias begins with number or non-alpha. While syntax doesn't let you call $888 because of interpreting that as something following the $8 parm, it is valid to call /888 as a command:

Code
/4chan {
  echo -a 4chan_alias $scriptline
}


(1b) Also aliases beginning with other non-alpha characters

Code
/&binvar {
  echo -a This is the &binvar alias $scriptline
}


(1c) Alias begins with codepoint above 127

Code
écho {
  echo -a écho test $scriptline
}
Écho {
  echo -a écho test $scriptline
}


Note: The alias names 4chan and &binvar do not glitch the jump if they are NOT preceded by the slash, so you can eliminate the glitch by removing the optional forward slash. However, the alias beginning with codepoint above 127 glitches regardless whether the slash is present. Codepoints 201 and 233 are not recognized as an upper/lower pair, so these are 2 separate aliases

(2) While the Alt+D window permits aliases to have an optional leading forward-slash, if the alias begins with 2 slashes, it triggers the glitch.

Code
//double_slash {
echo -a This double_slash alias causes a mis-jump for all aliases beneath and does not itself appear in the dropdown $scriptline
}


(2b)

Code
!!exclamation_test {
echo -a exclamation_test alias $scriptline
}


Note that preceding the alias name with 1 or 2 exclamation characters does not cause the mis-jump for the aliases beneath it, but both 1 and 2 of the exclamations does prevent that alias itself from appearing in the dropdown list

--

Since the menu joins letters f-k together, it's probably fine for all the codepoints earlier than [a-z] to be joined together.

Re: Alt+D alias list jump glitch [Re: maroon] #268478 21/02/21 02:27 PM
Joined: Dec 2002
Posts: 4,874
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,874
Thanks for your bug report. This issue has been fixed for the next version. I have also changed it so that instead of combining submenus, it lists all a-z submenus separately and adds a "?" submenu for non-a-to-z aliases.