Bug 99037

Summary: pasting in vim with scrollwheel scrolls text
Product: [Applications] konsole Reporter: Simon Perreault <Simon.Perreault>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Simon Perreault 2005-02-10 16:09:15 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    RedHat RPMs

It seems a scroll event is sent along with the middle mouse button press event when pasting text in vim. xterm doesn't have this bug.

How to reproduce:
0. You need a mouse with a scroll wheel acting like a middle mouse button.
1. Create a ~/.vimrc file containing a single line: "set mouse=a"
2. Create a new file with vim. Insert many newlines, more than the height of the konsole.
3. Select a dummy string not containing newlines (for the sake of simplifying the test case).
4. Press the middle mouse button while holding the shift key, in insert mode. The text will be inserted and vim will scroll up three lines, as if a scroll event had been sent.

Expected behavior:
The text shouldn't scroll!
Comment 1 Kurt Hindenburg 2005-02-11 08:08:15 UTC
It does appear that having :set mouse=a causes scrolling with Shift-MMB.  I personally don't use mouse=a in vim so I'm not sure what is suppose to occur.
Comment 2 Simon Perreault 2005-02-11 14:35:50 UTC
The following excerpt from Vim's manual (:help mouse) will probably be helpful:

        Note: When enabling the mouse in a terminal, copy/paste will use the
        "* register if there is access to an X-server.  The xterm handling of
        the mouse buttons can still be used by keeping the shift key pressed.
        Also see the 'clipboard' option.
Comment 3 Robert Knight 2006-08-07 17:35:43 UTC
Works correctly under Konsole for KDE 4 (ie. doesn't scroll).
Comment 4 Sergey Stolyarov 2008-07-03 19:33:32 UTC
Bug is still there. Checked on version 2.1 KDE 4.00.84 (KDE 4.0.84 (KDE 4.1 >= 20080625)) from Debian Experimental.

Try to open large python file, scroll in the middle, enter Insert mode and try to paste any text using middle mouse button/wheel