After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 401194 - pasting text at other than present cursor location
pasting text at other than present cursor location
Status: RESOLVED NOTGNOME
Product: gedit
Classification: Applications
Component: general
2.16.x
Other All
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 412257 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-01-26 23:34 UTC by Jim Brady
Modified: 2009-11-23 15:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Jim Brady 2007-01-26 23:34:07 UTC
Please describe the problem:
When I do a copy/paste, or cut/paste, it sometimes pastes the text at a location other than the present cursor position - sometimes before, sometimes after.  Apparently random location. It does not depend on whether pasting text within same doc, or from other doc, and not depend on whether I use Ctrl-V or the paste icon.  I always use gedit with .cpp files (C++) so do not know if it may happen with other types of files.



Steps to reproduce:
1. Open .cpp file and select (hilite) some word on page, for example.
2. Press Ctrl-C, move to different location on page, click page to set new cursor position.
3. Press Ctrl-V.  (describing normal copy / paste operation) 

Actual results:
The selected text is pasted at some apparently random location in .cpp file.

Expected results:
I expect selected text to be pasted at present cursor location.

Does this happen every time?
Not consistent, happens maybe 1/4 of the time.  Most of time is OK.

Other information:
Was happening with gedit 2.15.x, also happening with 2.16.2.  Running Fedora Core 6 on Dell Pentium notebook.
Comment 1 Paolo Borelli 2007-06-26 14:07:15 UTC
*** Bug 412257 has been marked as a duplicate of this bug. ***
Comment 2 Paolo Borelli 2007-06-26 14:09:30 UTC
I never managed to reproduce this... does it still happen with newer gedit/gtk?
Comment 3 Jim Brady 2007-06-26 16:29:56 UTC
Update June 26, 2007
I have not tested with newer gedit/gtk (using gedit 2.16.2 / gnome 2.16.0), but I now think it is related to some problem with my system (Fedora 6 on Dell notebook) .... because I have been using the Geany programming editor (similar to gedit) and the problem also happens with that.
Comment 4 Chyan 2008-04-09 03:38:13 UTC
I also have the same problem.
gedit version 2.20.4 in Fedora 8 Distribution

I edit shell scripts with gedit version 2.20.4

When I do a copy/paste, or cut/paste by Pressing Ctrl-C,Ctrl-V,Ctrl-X
It sometimes pastes the text at a location other than the present cursor position - sometimes before, sometimes after.

It let me think gedit is unreliable.
Comment 5 Jim Brady 2008-04-09 17:57:31 UTC
Update: I now think the problem may have been related to clicking the scroll wheel on my mouse when I was scrolling between the "cut" location and the "paste location".

I was seeing the problem both with gedit and the Geany programmer's editor, both running on gnome 2.20/ Fedora 8, on 2 different machines, with Microsoft USB wheel mouse on both.

When rapidly scrolling, I realized that I was pressing down on the scroll wheel and "clicking" the scroll wheel.  And those scroll wheel click events implement some function assigned to that event - I am not sure what in this case. 

Since I have been careful to not click the scroll wheel while scrolling, I have not seen the problem.
Comment 6 Ron Leck 2008-09-11 14:35:42 UTC
To build upon comment #5, I have seen the same problem. In my case, you can tell a 'phantom' paste will happen when you click the paste icon or enter <control v> and nothing happens. The next time you invoke the paste function it is executed at the current cursor position which is what you want but at a random location there is a copy of what you just pasted.
My work-around for now is, if you paste and nothing happens, immediately hit 'Undo' to remove the Phantom Paste.
Incidently, I am running on RHEL 5.2 with Gnome 2.16 and GEdit 2.16.
This is on old CyberResearch pc with a Dell wheel mouse.

My Dell Latitude w/Logitech wheel mouse and Redhat Scientific Linux 5.0
kernel 2.6.18 with Gnome 2.16 , GEdit 2.16 works just fine, never had this problem.
Comment 7 Paolo Borelli 2009-01-05 13:14:43 UTC
we've had no further reports of this and reading the comments above it looks like it aslo happened with geany etc... I guess that maybe it was a bug in old versions of gtk or X etc.
Comment 8 Ron Leck 2009-01-05 16:38:05 UTC
The phantom edits were due to a 'sick' mouse. Replaced the mouse and the problem went away.
Comment 9 Jean-Philippe Fleury 2009-11-23 14:29:24 UTC
I have this bug too for a long time with gedit, and I still have it with gedit 2.28.0, Gnome 2.28.1 and Ubuntu 9.10. I don't encounter this bug with other programs that gedit.

As described, Ctrl+V sometimes pastes in a random location, so if I don't see the string pasted, I must undo and paste again.

Is there a way to provide more information for this particular bug, like some backtrace?
Comment 10 Michael Tenenbaum 2009-11-23 15:12:27 UTC
This bug also exists with the Bluefish editor.

It is really annoying.  In desperation I changed to the less convenient Adie editor which is NOT based on gtk but at least copy and paste works.

The excuse of a "sick" mouse doesn't play out because, as noted above, non gtk based applications do not experience this problem.

I'm using gtk+-2.18.3