[Konsole-devel] [Bug 89299] prevent paste of newline characters

Alain Knaff kde at kde.lka.org.lu
Mon Oct 3 07:44:47 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=89299





--- Comment #42 from Alain Knaff <kde kde lka org lu>  2011-10-03 07:44:47 ---
(in reply to comment #41)
Sounds awfully complicated and prone to breakage (just think about
continuations which don't involve semicolon such as pipes or quoted strings, or
non-shell text altogether)

Please, whatever you do, don't throw away the "normal" copy-paste, and keep it
easily accessible (maybe using a checkbox somewhere in the config "I know what
I'm doing")

A safer alternative would be:
- if single newline at end: just drop it
- if multiple newlines: on paste, pop up a dialog with "text contains multiple
lines, are you sure to proceed?" along with first couple of lines and last
couple of lines.

Transparently changing newlines into semicolons could potentially introduce
more problems than it solves (pipes,...) and makes the pasted text look like a
garbled mess.

As for the point of "knowing what you are pasting": a good start would be to
fix the handling of "loss of selection" event. In the old days, when a window
lost the selection, it would unhighlight it. Some rare applications, such as
xterm, still do, and this is good.

But almost all the other apps (and konsole too...) have lost this ability over
the last few years, and continue showing a selection long after they've lost
it. This is confusing, and dangerous, because you cannot trust what you see.
Usually, it's not that much of an issue because smart user select only just
before pasting, but imagine what happens if you're interrupted in the middle of
something, and come back to your work later on.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list