mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2012
Posts: 19
K
krypto Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2012
Posts: 19
If a pasted string ends in a line break and the next line is empty, mIRC treats those two lines as one.

So to mIRC, currently...

"Hello.
"
is one line

and

"Hello.
a"
is two lines.

You can test this by setting the "Confirm when pasting [] or more lines" (from Options->Other->Confirm...) to 2 and then copying and pasting those two lines. mIRC will not ask for confirmation on the first example, but on the second example it will.

EDIT: There was a discussion about this here:
https://forums.mirc.com/ubbthreads.php/ub...ith_line_change

Last edited by krypto; 01/09/12 09:44 AM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
The second line doesn't actually get pasted, so you are only pasting 1 line anyway-- which means mIRC is right, and there is no need for a confirmation. I see no problem with mIRC stripping the empty lines off the end of the content to optimize that specific case. It can't do it with empty lines in the middle of content, because that would require parsing the entire string (stripping lines off the end is a simpler process). Actually, I shouldn't say "can't", because it *could* do that as well, this is just a simple optimization, not a bug.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2012
Posts: 19
K
krypto Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2012
Posts: 19
Why I think this is a bug is that mIRC acts if it were in fact two lines because mIRC processes the linechange. An empty line is still a line and that is what the confirmation message should be there for.

Even in the case of
"Hello
a."

I'm still pasting only one line, because mIRC does the default action of /say on the first line and the second line is left in the editbox because it doesn't end in a linechange. If I have made my editbox sizing automatic, it makes no difference between:

"Hello.
"

and

"Hello.
a"

mIRC has moved the blinking line to the second line in both cases, so clearly it thinks that there are in fact two lines being pasted on both occasions. If what you're saying is true, then pasting:

"Hello.
"

Would have the blinking cursor/line/whatever it's called still in the first line right after "Hello.", but it's not, it's on the second line. Empty, as in "", isn't the same thing as null.


EDIT: This wouldn't be impossible or even that hard to fix. There's the right way the wrong way and the quick way to do things. The quick way being the wrong way but only faster.

It isn't called optimization, it's called lazy coding. It would be like asking for an amount and someone enters $123. Instead of doing it correctly and removing the illegal character $, you just set the amount to 0.

Last edited by krypto; 01/09/12 10:39 PM.
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Originally Posted By: krypto
Even in the case of
"Hello
a."

I'm still pasting only one line, because mIRC does the default action of /say on the first line and the second line is left in the editbox because it doesn't end in a linechange.


That's not true. It will send both lines immediately in this situation (which I think is good behavior, since it seems like you would want that to happen in cases of pasting multiple lines).

The fix for the single-line issue is simple as I described already here: https://forums.mirc.com/ubbthreads.php/topics/238844/Re_Pasting_text_with_line_chan#Post238844

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
The "right way" would be for mIRC to only ask for confirmation when the actual number of lines being pasted are greater than the min threshold in your settings. Since a blank line is not pasted, it shouldn't count to the number of lines. If the "a." was not pasted, counting that would be a bug, but according to drum, mIRC does in fact paste that second line in your example.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2012
Posts: 19
K
krypto Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2012
Posts: 19
Ok, I tested and mIRC does in fact /say both lines when pasting eg.

"Hello.
a"

Which is really weird, because the second line does not contain a linechange at the end and mIRC should have no reason to /say it. I don't know of a single possible reason why someone would want to paste and let mIRC automatically /say even a single line. I would say that nine out of ten times it is done by accident. If for some reason you need to paste and say multiple lines, you're doing something wrong. This was a good feature before services like pastebin or paste2, but today it's a completely worthless bug rather than a feature.

Why are you people defending these bugs by trying to convince others and yourself that these bugs aren't bugs? I bet it's the reason why everything else gets updated over the years and mIRC still looks like it just came out in 1995.

Originally Posted By: argv0
The "right way" would be for mIRC to only ask for confirmation when the actual number of lines being pasted are greater than the min threshold in your settings. Since a blank line is not pasted, it shouldn't count to the number of lines
But the blank line IS pasted, mIRC just ignores it and doesn't /say it because it's empty.

EDIT: Don't confuse what's being pasted and what mIRC /says. This issue is about the actual number of pasted lines. Not what mIRC thinks is being pasted but what's being actually pasted.

Last edited by krypto; 02/09/12 05:49 AM.
Joined: Jan 2012
Posts: 19
K
krypto Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2012
Posts: 19
Also you can confirm that trailing empty line is definitely a bug by setting the line limit to 3 and then pasting for example

"hello

a"

mIRC will ask if you wish to paste 3 lines. Not 2 and if you select that you wish to do this, mIRC says only 2 lines and ignores the empty line. By your logic, mIRC shouldn't warn me about pasting that because it's only 2 lines getting the /say treatment.

EDIT: It also treats

"Hello.

a
"

as 3 lines, so it ignores the empty line at the end but counts the empty lines in the middle.

You can also test pasting

"
Hello." and mIRC will say that you are pasting 2 lines. So mIRC counts the empty lines before /saying a line that contains something else than "".

The last empty line(s) is/are ignored, it's a bug, end of story. You are confusing what mIRC does and what is being actually done.

"Hello.
"

is the equivalent of pasting two strings:

"Hello.\n"
and
""

You are not pasting
"Hello."
and
NULL

EDIT: The very first post in this thread is 100% accurate. You're just messing the thread up by trying to defend the bug and acting like it's not there.
EDIT2: If mIRC was my program that I created, I wouldn't let you trolls on my forums messing up chances of finding and/or fixing the bugs in my program. This section of the forum should be about reporting bugs, not a place where YOU come and defend every single bug untill you're forced to agree that there is a bug. What if someone just comes in, reports a bug and leaves, he's not there to defend fixing of the bug, so the bug doesn't get fixed because you "win" the bug argument by default.

Last edited by krypto; 02/09/12 06:21 AM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: krypto
Also you can confirm that trailing empty line is definitely a bug by setting the line limit to 3 and then pasting for example

"hello

a"

mIRC will ask if you wish to paste 3 lines. Not 2 and if you select that you wish to do this, mIRC says only 2 lines and ignores the empty line. By your logic, mIRC shouldn't warn me about pasting that because it's only 2 lines getting the /say treatment.


Just a quick note on this part... mIRC does not go through and parse your entire pasted text to find empty lines. This was mentioned earlier either in this thread or the other one. So any empty lines in the middle will still be treated as a line when pasting regardless of whether or not it pastes it. It certainly could check for that, but that would be processing more information when you paste. It's very easy t do a count on new line characters to determine how many lines there are and it's very easy to ignore the last empty line(s) in that count. It takes more work for the software to really parse through the text and determine how many lines there are after removing blank lines. It would probably be worth it to do that, though. If it's not going to send to the server, why count it?

Personally, I think the proper way to handle the line count when using the confirmation is that it counts all lines ending in a new line character and ignores any that are not ending in a new line character. After all, if the last line doesn't end in a new line character, then it's not being sent to the server, so should not be counted. The purpose of the confirmation isn't to prevent you from pasting text into your edit box by accident, but to keep you from sending it to the server by accident. If it's not being sent, there's no reason to count it. That really isn't a bug, but just something that was probably not considered when it was added.


And, so you are aware, telling people why something works the way it does or why something isn't a good idea does not make someone a "troll". It's also not a bad thing for people to do this. There has to be a discussion of all sides (pros and cons) for a developer to decide what is worth doing and what is not. If no one was allowed to disagree, then you'd have a ton of suggestions where most of them are things that a lot of people wouldn't want. If the developer doesn't know that, then the software can end up becoming garbage really quickly. You may not like people shooting down your ideas or telling you why something is the way it is, but that's necessary for good development (seeing all sides). It also lets you learn about the software so you can make better and more informed suggestions... assuming you care to learn from what people say. Finally, name calling is never a good way to get anyone to listen to what you say. Keep doing it and no one will care about your suggestions even if they are good suggestions and then you're just wasting time typing for nothing.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2012
Posts: 19
K
krypto Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2012
Posts: 19
Originally Posted By: Riamus2
Just a quick note on this part... mIRC does not go through and parse your entire pasted text to find empty lines. This was mentioned earlier either in this thread or the other one. So any empty lines in the middle will still be treated as a line when pasting regardless of whether or not it pastes it. It certainly could check for that, but that would be processing more information when you paste.
The current versions of mIRC require a modern operating system. It isn't running on Windows 3.11 on a 286 cpu with 256kb of RAM. I have not seen the source code of mIRC, so I wouldn't know how it's done internally. The operation wouldn't even be noticeable on any modern-ish (from 15 years old to this day) desktop, laptop or netbook. Or are you seriously saying that people would notice some VERY simple operations done to a string compared to whatever it's doing right now?

Originally Posted By: Riamus2
After all, if the last line doesn't end in a new line character, then it's not being sent to the server, so should not be counted.
But it is being sent to the server if it's not empty regardless if it ends in a new line character or not when pasting more than one line. Didn't you do any testing on this bug before replying on how it works?

Originally Posted By: Riamus2
The purpose of the confirmation isn't to prevent you from pasting text into your edit box by accident, but to keep you from sending it to the server by accident.
As I already said, it doesn't do that. If what you say is it's intended purpose, then it's broken.

Originally Posted By: Riamus2
And, so you are aware, telling people why something works the way it does or why something isn't a good idea does not make someone a "troll".
I'm just pointing out the obvious based on what I have seen. But you're right, I was overreacting on calling all the regulars trolls when I should have just called you one.

Originally Posted By: Riamus2
There has to be a discussion of all sides (pros and cons) for a developer to decide what is worth doing and what is not. If no one was allowed to disagree, then you'd have a ton of suggestions where most of them are things that a lot of people wouldn't want.
This isn't a feature request. This is a bug report. A bug either exists or it doesn't. Although the two, bug report and feature request, are pretty much the same thing in the end at least in this case. The discussion is pretty one sided anyways. It's basically you saying "I think this is what the developer wanted anyways, so it's not going to be changed" or "This is how it is and this is how it should and will be". That's your silver bullet against all bug reports and feature requests that YOU don't like (and I'm pretty sure it's a logical fallacy as well).

Why I'm replying is that I don't want Khaled to read the first post, then skip to the last post and read:
Originally Posted By: Riamus2
That really isn't a bug
And think he can skip over the bug.

EDIT: Just as a reminder, there are other clients out there and the number increases every year.

Last edited by krypto; 02/09/12 11:06 PM.
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
I think you really need to calm down, we're not here to put you down or to put down your bug reports/feature suggestions.
I think we give objectives point of views because most of the time if not all, they are reflecting what Khaled would say.
mIRC is a big program with a lot of behavior you might not like, but most of them are actually quite logical and can be explained easily, we pretty much explained how and why it was working that way here. If you still want a message from Khaled on this, then just wait for his answer. It only seems one-sided for you because you refuse to understand the reasons we gave.
Note also that it's unlikely that Khaled skips a bug report because one is saying it's not a bug.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
If the line isn't sent to the server, it doesn't count as being pasted. End of story.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Thank you everyone for your feedback, I'm sure Khaled can make an informed decision with all this information.

Regards,


Mentality/Chris

Link Copied to Clipboard