mIRC Homepage

Alt+D alias list jump glitch

Posted By: maroon

Alt+D alias list jump glitch - 19/02/21 06:50 PM

Item#3 in:

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:

/4chan {
  echo -a 4chan_alias $scriptline

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

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

(1c) Alias begins with codepoint above 127

é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.

//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


!!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.
Posted By: Khaled

Re: Alt+D alias list jump glitch - 21/02/21 02:27 PM

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.
Posted By: maroon

Re: Alt+D alias list jump glitch - 04/04/21 06:26 AM

The beta now having the alias index for $script files caused some changes for aliases files which may not be intentional.

The aliases.ini shows the alias grouped with the 1st letter only if it doesnt have a prefix in front of it. That means the 'foo1' alias shows in the sorted list under the letter 'f', while 'foo2' 'foo3' and 'double_slash' are sorted by their prefix within the "?" menu item, along with all the other sample aliases like /j /op etc. Formerly, foo1 and foo2 would both be listed in the f's.

foo1 echo -ag test1
/foo2 echo -ag test2
!foo3 echo -ag test3
&binvar echo -ag alias &binvar is listed with the 'b' underlined
upper&lower1 echo -ag upper: $upper($1-) lower: $lower($1-)
upper&&lower2 echo -ag upper: $upper($1-) lower: $lower($1-)
//double_slash { echo -ag doubleslash }

Also, if the /* beginning a multi-line comment is located on line 1 of aliases.ini or a $script file, a phantom /* entry appears in the "?" index. But if that comment starts at line 2 it doesn't appear in the list.

Also, something that previously existed but I didn't report previously, that's due to the normal way that menu{} and dialog controls handle the & char. Both aliases containing the single & are instead shown with the following letter underlined, and the alias containing a double & shows only 1 of them without any underlining. Same thing has always happened in other places, like the way "/window @test&test" appears in the window dropdown menu. For dialogs, we sanitize the dialogcontrol's text like $replace(string,&,&&).
© 2021 mIRC Discussion Forums