The way it is now, if you wrote "say hehehe", then "say hello" 10 times, and write "say he" and press the up arrow or whatever you use for completion, MUSHClient would display the 10 "say hello" commands before going to "say hehehe". That is a bit useless, because you already implied you didn't want "say hello" the first time you saw it. My suggestion is that MUSHClient should check if the next completion command is the same as the previous one, and if true, omit it by going to the next one, where it will check again, and so on... Also, another suggestion would be that MC didn't show "say hello" as a suggestion if you typed "say hello" and press the up button, but instead, show the next suggestion, which might be "say hello there!". That would be the same code as the 1st suggestion, but it would include the command you typed in the first command variable. I don't know if you understand it, so here are examples:
The commands "say hello there", "say hello", "say hello", "say hello", and "say hello" are in the buffer. You type "say he" and press the up arrow. MC would put "say he" in a variable, and seek the previous command, which would be "say hello". Then, "say hello" would be set as the variable. You press the up arrow again, because that's not what you want. MC looks for the next command, which is again "say hello", compares it against the var and sees that you already turned that one down. Then MC goes through the commands until it reaches "say hello there", and displays it to you. You want that, and press enter.
On the second scenario, you write "say hello" and press the up arrow. Since that is the command in the variable, MC skips all the "say hello"s and goes directly to "say hello there!", because if you wanted "say hello" you'd just press enter.
The commands "say hello there", "say hello", "say hello", "say hello", and "say hello" are in the buffer. You type "say he" and press the up arrow. MC would put "say he" in a variable, and seek the previous command, which would be "say hello". Then, "say hello" would be set as the variable. You press the up arrow again, because that's not what you want. MC looks for the next command, which is again "say hello", compares it against the var and sees that you already turned that one down. Then MC goes through the commands until it reaches "say hello there", and displays it to you. You want that, and press enter.
On the second scenario, you write "say hello" and press the up arrow. Since that is the command in the variable, MC skips all the "say hello"s and goes directly to "say hello there!", because if you wanted "say hello" you'd just press enter.