Bug 207819 - add option to disable dangerous text-dragging
Summary: add option to disable dangerous text-dragging
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Unspecified
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-18 20:58 UTC by z.kdebugs.9.duke2
Modified: 2011-08-03 17:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description z.kdebugs.9.duke2 2009-09-18 20:58:54 UTC
Version:            (using KDE 4.3.1)
Installed from:    Debian testing/unstable Packages

When I select text in Konsole and then want to select a subset of existing selection instead, I have to cancel the existing selection first by clicking somewhere, otherwise the selected text stats to be dragged.  In KDE3 clicking elsewhere was not necessary -- the selection was started anew.

I wish there was an option to disable editing by text-dragging, I find it useless (the selection was already put it in the clipboard!) and can be potentially disastrous for someone who isn't used to it, because dropping a multiline selection into konsole (when you only wanted to select its subset) will immediately execute everything but the last line as a command!

A global option to disable this in KDE would be even better, but I'm filing this against konsole where it can be not only annoying, but also dangerous.  Even MS Word has an option to disable this ever since I used it.
Comment 1 Andreas Nordal 2010-06-03 14:14:22 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Andreas Nordal 2010-06-03 17:16:51 UTC
I can testify that Konsole is dangerous.

Let me add that in Konqueror (I'm using 4.4.3), clicking outside the selection is not necessary to re-select, except in textareas (but that doesn't bother me). I love that. Selecting lines and paragraphs is simply the way I read! This aids me to see where I am.

Unfortunately, I don't always remember to change my reading habits when reading from Konsole, and I frequently read files using cat when logged on to remote machines. The resulting execution of arbitrary lines has lead to a few mistakes, of which one was particularly embarrasing and luck saved me from data destruction.

* Embarrasing mistake
As maintainer of my student organization's website, I was examining a backup script. In case of failure, the script would use the mail command to alert the mailinglist... I replied on the mailinglist, saying that I caused the false alarm by accidentally pasting the mail command in the terminal. I was lucky that the mail command was harmless in terms of data destruction.

* Data loss
Consider this simplified version of the mentioned backup script:
 #!/bin/sh
 
 CURTIME=`/bin/date +%s`
 (( OLDTIME=(CURTIME-86400) ))
 
 #backup stuff
 /bin/mkdir -p b-cup/$CURTIME
 /bin/cp -upR stuff/* b-cup/$CURTIME
 
 #delete 7 days old backup
 /bin/rm -rf b-cup/$OLDTIME

Executing the last line without executing the fourth line will delete all backups instead of one, because $OLDTIME is likely not set.
Comment 3 Kurt Hindenburg 2010-06-03 18:35:24 UTC
I don't see any reason for the current behavior so no option is needed IMHO.
Comment 4 Andreas Nordal 2011-04-11 17:04:38 UTC
If we could solve the danger of pasting (due to possible newlines), which is bug 89299, it would take away the «danger» from this problem. Maybe the annoyance would remain, but it would be an acceptible fix IMHO.

In fact, I have a suggestion for solving 89299:
https://bugs.kde.org/show_bug.cgi?id=89299#c40

What do you think? Please vote for that bug too.
Comment 5 Jekyll Wu 2011-08-03 17:34:48 UTC
Since #165923 has been fixed and now text-dragging happens only when CTRL is pressed, I think the problem in this bug does not exist any more.  So close it.

Feel free to reopen it if I misunderstood the problem.