Bug 241877 - Paste at cursor (instead of paste under mouse)
Summary: Paste at cursor (instead of paste under mouse)
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-16 04:00 UTC by airfullbete
Modified: 2019-03-03 16:27 UTC (History)
6 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 airfullbete 2010-06-16 04:00:33 UTC
Version:           2.1b4 (using KDE 4.4.3) 
OS:                Linux

There are two natural ways for the middle button pasting function to work:
1) paste under mouse: text is copied at the position the mouse is pointing to regardless of the cursor position.
2) paste at cursor: text is copied at cursor position regardless of where the mouse is pointing.

Kile is using 1) and there is no way to enable behavior 2) (at least i haven't found). IMHO, 2) is much more practical and faster.

I suggest implementing 2) and having an option for the user to select which works best for him.

Thanks,

AB

Reproducible: Always
Comment 1 Michel Ludwig 2010-06-16 10:10:26 UTC
This would have to be added to KatePart. Forwarding.
Comment 2 FiNeX 2010-06-18 09:31:24 UTC
Usually which editor behave like 2) ?
Comment 3 airfullbete 2010-06-18 14:03:07 UTC
- bash console works like 2)
- vi works like 2)
- I've configured my xemacs to work like 2) although its default bahavior is 1).
- ctrl-v works like 2) it all editor i know.

IMHO, there is no advantage in 1).
- If you want to paste somewhere in the editor where the cursor is not currently position to, you have to bring your mouse there anyway. With 1) you then middle click and the cursor gets position after the pasted text. With 2) you have to left click first and then middle click. It looks like 1) is winning here but my experience is that i prefer to set the cursor first to be sure that the pasted text is going to be inserted exactly where i want. With 1) it happens every now and then that the pasted text ends up 1 caracter on the left or on the right or on a different line than what i was aiming for just because the mouse moved while i was hitting the middle button.
- If you want to paste at the current cursor position then clearly 2) is the winner. And this situation happens very often, e.g. copy-pasting from window to window (for pasting with 1) you have to find the cursor in the destination window while with 2) you only have to find the window itself!).

I would really appreciate being able to configure this behavior for several KDE applications: kile, kate, kmail, etc.

Thanks,

AB.
Comment 4 Cristian Tibirna 2010-06-18 16:13:50 UTC
I wouldn't assign this to Kate. All text insertion widget should support the distinction between these to mouse pasting methods.

From a point of view of Qt programming, this should be quite simple: do not do mouse pointer repositioning before doing pasting. The problem is that of a central configuration and propagating the obeying to it to all concerned widgets.

I will also explicitly state that I find the report highly pertinent. It is in perfect accord with Fitt's law.