From: Pascal J.B. <pj...@in...> - 2004-10-17 16:55:18
|
Brian Palmer writes: > I believe that the current behaviour dealing with sending whitespace > only lines is broken when dealing with sending input that contains > newlines. This has been fairly embarrassing in the past when pasting > code into irc, for example, and I know it's struck some other people > :-) > > I'm proposing the following patch, which will change the behaviour to > allow switching between sending no whitespace-only lines, sending only > whitespace-only lines that are not the beginning or ending, and > sending every whitespace-only line, with it defaulting to the second > case. (I suppose ideally it would collapse together multiple leading > or trailing lines, but the code does not currently do so ). > > I'm asking for opinions as to whether all three of those options > should be present, whether more should be added, and if so, what the > default would be. (I don't foresee a tremendous use for the 'middle > behaviour myself (I plan on setting it to nil and keeping it there), > but some others on the channel thought it'd be useful, and be a > reasonable default). > > Depending on feedback, I'll probably commit this tomorrow. While you're at it, trim spaces on the left (and right) to avoid sending /commands to the channel just because there's some space at the beginnning. But don't space-trim pasted multi-lines. An option for pasted lines would be to prefix the lines with a "quote" string such as "| " or "> " (to avoid problems when pasting //comments for example). -- __Pascal Bourguignon__ http://www.informatimago.com/ Voting Democrat or Republican is like choosing a cabin in the Titanic. |