Bug 167993 - Cursor jumps sometimes when pasting text in vim with the middle mouse button
Summary: Cursor jumps sometimes when pasting text in vim with the middle mouse button
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-01 15:35 UTC by Diederik van der Boor
Modified: 2017-02-13 03:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.vimrc file for VIm to reproduce bug (5.25 KB, text/plain)
2011-10-14 11:24 UTC, Sergey Stolyarov
Details
sampe python file to reproduce bug (4.41 KB, text/plain)
2011-10-14 11:25 UTC, Sergey Stolyarov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2008-08-01 15:36:43 UTC
Version:           2.1 (using 4.1.00 (KDE 4.1.0) "release 16.3", KDE:KDE4:Factory:Desktop / openSUSE_10.3)
Compiler:          gcc
OS:                Linux (i686) release 2.6.22.17-0.1-default

When I'm pasting text in vim (using the middle mouse button), the cursor sometimes jumps a few lines down.

This can be reproduced by selecting text fastly.

Somehow the selection in konsole lags behind the mouse cursor. If the middle mouse button is hit before konsole is up-to-date with the selection, the mouse cursor will jump after vim inserted the text.
Comment 1 Diederik van der Boor 2008-08-01 15:47:32 UTC
The effect seams to be easier to reproduce on a composited desktop. (using a Intel 82865G graphics chipset).
Comment 2 Robert Knight 2008-08-01 16:41:41 UTC
Do you have mouse functionality enabled in Vim?  If you're not sure - see whether holding the shift key down before and during making a selection makes any difference.
Comment 3 Diederik van der Boor 2008-08-04 09:15:00 UTC
Yes, I have 'set mouse=v' enabled.
Comment 4 Diederik van der Boor 2008-08-04 09:20:33 UTC
Removing the 'set mouse' line, or holding shift down doesn't fix this bug unfortunatly.
Comment 5 Dario Andres 2008-12-27 01:46:57 UTC
Can you still reproduce this bug with a recent KDE version? (4.1.3 / 4.2beta2 / 4.2svn) ?  Thanks :) 
Comment 6 Sergey Stolyarov 2009-12-28 09:24:25 UTC
I can reproduce on 4.3.2 (Debian unstable).
Comment 7 Diederik van der Boor 2009-12-29 19:01:22 UTC
It looks like this is caused by Konsole responding to a scroll-wheel event, things are a bit too sensitive / it's easy to scroll acidently while doing a middle-click with the scrollwheel.
Comment 8 Sergey Stolyarov 2009-12-29 20:51:18 UTC
Nope, in xterm or gnome-terminal such thing never happens, it's konsole-related issue. Also it's never occures in other console apps but vim.

Also it occures in certain cases, for example, while editing large files$ on small files it never happen. Also it scroll always in the same direction.
Comment 9 Sergey Stolyarov 2010-08-11 11:33:35 UTC
So what about fixing this bug? It's absolutely not related to accidental scrolling event, it occurs for middle click from touchpad e.g. And never happen in other apps except vim.
Comment 10 Sergey Stolyarov 2011-06-08 08:34:55 UTC
Bug is still here, please take a look.
Comment 11 Jekyll Wu 2011-10-14 11:16:49 UTC
(In reply to comment #10)
> Bug is still here, please take a look.

I would like to, but I failed to reproduce the problem. I guess that is why this report  is still 'UNCONFIRMED' 3 years later. Could you please provide clear and concrete steps to reproduce the problem in HIGH probability?
Comment 12 Sergey Stolyarov 2011-10-14 11:24:03 UTC
Created attachment 64513 [details]
.vimrc file for VIm to reproduce bug
Comment 13 Sergey Stolyarov 2011-10-14 11:25:24 UTC
Created attachment 64514 [details]
sampe python file to reproduce bug
Comment 14 Sergey Stolyarov 2011-10-14 11:32:15 UTC
So to reproduce the bug perform these steps:

1. Copy attached .vimrc to ~/.vimrc (or use any other way to make vim us this file as config)
2. Copy attached python file ()
3. Open setupscons.py in VIm in konsole tab
4. Scroll to the middle of text, enter edit mode
5. Hold Shift key and copy some charcters to the clipboard
6. Click Middle mouse button some times, text should be pasted ok
7. Now switch mouse mode in the editor: exit to normal mode and execute command ":set mouse=a"
8. Enter edit mode and repeat steps 5,6 some times

After some pastes text scrolls one line down sometimes.
Comment 15 Jekyll Wu 2012-05-14 09:12:40 UTC
OK, I think I finally notice this problem when using vim. No idea about the root cause at the moment, though.