Bug 169396 - editing in vim gives unwanted pastes when using insert mode
Summary: editing in vim gives unwanted pastes when using insert mode
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-08-18 20:56 UTC by solsTiCe
Modified: 2018-10-27 04:07 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 solsTiCe 2008-08-18 20:56:33 UTC
Version:            (using KDE 4.1.0)
OS:                Linux
Installed from:    Unlisted Binary Package

when i edit some text in vim i very often have text not wanted.

one simple example is with OI.
from command mode, type O to insert a new line before current line and begin typing a capital i.
if you do it quickly with shift key down, it almost all the time paste some unwanted text.

it seems your are out of insert mode after the I. 
i don't know what can cause this. it seems to happen when you type fast 

it's with vim 7.1.315 and with vim 7.2.2 and konsole 2.1

and surely a bug of konsole rather than vim. 

my feeling ===============================
kde 4.1 is still full of bug and missing many features(like konsole) because dev had to hunt down all the bugs. shame on you
or may be konsole is not enough eye-candy and not a priority anymore ???
Comment 1 A. Spehr 2008-08-19 08:39:40 UTC
I can't reproduce this. 
4.1.62 kdebase r848775

What video card are you using? What character encoding? An odd keyboard mapping? Just guessing at random things that might cause this.

Konsole is a priority: All the developers use it. ;)
Comment 2 solsTiCe 2008-08-19 11:17:49 UTC
the video card is irrelevant. it happens inside vim. the character encoding is by default utf-8 editing C code or python code. using the fr layout from xorg.conf

it does not happen all the time. it seems it is after some hours and i can't find a sure way to reproduce this. 

close the bug then if you can't reproduce it
Comment 3 A. Spehr 2008-08-20 05:32:32 UTC
Well, so it isn't easy to reproduce. But it might exist and presumably it is still a valid bug, and therefore good to know about, so I'll defer to the developers on if they want to close this or not.

Your video card may or may not matter. I don't know. If you can screenshot what you see, that would be useful.
Comment 4 Robert Knight 2008-09-22 03:48:08 UTC
Closing the bug as per comment #2 as there hasn't been a further reply yet.
Comment 5 solsTiCe 2008-09-22 13:07:52 UTC
it happens in vim and yakuake (but in konsole too)
you need to have something in registers. just yank or delete something.
then enter insert Mode with O or I and continue typing caps (holding shift key) and doing relativly fast. as if you type. and then all a sudden vim paste one of your buffer. 
it seems to go out of insert mode and paste one of the buffer
very anyoing when typing something in caps. at least two caps in a row.

it happens with an empty. vim directory

please try it and reopen the bug
Comment 6 Robert Knight 2008-09-22 13:46:31 UTC
Reopening as per comment #5
Comment 7 Gord 2008-10-14 04:39:28 UTC
It seems that in konsole 2.1 there are strange escape codes being sent to the text app. In nano the cursor jumps all over the place while typing. It's often hard to enter a password for "ssh" or "su". 
PS. This behaviour does not occur with konsole 1.6.6.
Comment 8 Robert Knight 2008-10-14 12:00:22 UTC
> please try it and reopen the bug 

I should clarify that I haven't been able to reproduce the bug.  Since I use Vim all day at work I really would have noticed by now if there was a problem which affected all Vim users.

Comment 9 Gord 2008-10-14 17:33:59 UTC
I think I have resolved the issue by swapping out my MS wireless natural keyboard with a wired version. Previous to the keyboard swap every 20-30 characters typed in rapid succession would cause a newline to be entered. 

Though its odd that the strange behaviour was only present in konsole while editing with nano or entering passwords. Kate/owriter/etc. all behaved properly. 
Comment 10 A. Spehr 2008-12-01 12:26:45 UTC
solsTiCe: Are you using a wireless keyboard too?
Comment 11 solsTiCe 2008-12-01 23:07:01 UTC
no. a usb keyboard

i do not currently use kde.
I made a quick test of konsole under gnome and i couldn't reproduce the bug. so i wonder if it's not some global shortcut or something like that. one sure thing is it happens when typing fast. 

close the bug if you want... 
Comment 12 solsTiCe 2008-12-01 23:09:33 UTC
i was also using xorg 1.4 at the time i encountered the bug. now i use xorg 1.5 and the default evdev for input
Comment 13 A. Spehr 2008-12-01 23:27:54 UTC
Is there anything that would have been specific to your installation that would help in reproducing this bug? ie can you give any other information? And does this seem to exist in the latest 4.2beta? 
Comment 14 Pavel Shved 2008-12-23 12:09:00 UTC
For vim i reproduced this many times.  KDE 3.5 and 4.1.  Both were on openSUSE (various versions) and Gentoo.  evdev-driven wireless (sometimes correctly, sometimes incorrectly set up) Logitech on Gentoo and out-of-the-box wired Mitsumi on openSUSE.

I think i have figured out steps to reproduce.

1. Open vim.

2. Press O at any line--and press ESC immediately.  Do not move cursor anywhere.

3. Repeat step 2 until you do it fast enough (you don't have to be extremely fast, actually, you have nearly a couple of seconds).  You'll see that, after some time, every time you press O, a new line is not inserted immediately.  Instead you see the literal O symbol and only after notable pause will it disappear and let you see a new line inserted and ready for typing.

4. If you type another symbol during that pause (between O symbol appearance and new-line insertion), it will yield some weird stuff.  For example, typing Om yields `-' character in the same line.  Typing OM yields new-line _after_ (not before) the current :-).  Some keys trigger <F2> or <F3> pressing...

The possible reason is that the process of interaction of vim and konsole (or some other terminal layer) needs pauses when processing ESCAPE presses or other non-printable characters.  If you try to do something else during these pauses, it messes something up.  Also, this kind of queue is `flushable'; you flush it by moving cursor.

I also noticed this bug when i was trying to write scripts that relied on immediate handling of <ESC> key presses.

So, whose bug is it?  Not konsole's--I've just made it in gnome's terminal+KDE.  And i remember it with totally non-kde ubuntu, but, that's to be checked out--you have the steps now.

And, finally, it's totally OK out of X.  In simple console it isn't reproduced (:imap a bbb<ESC><ESC>Oxxx  -- the script that helps in reproducing, to clarify it's not the case that I'm just not fast enough).  So, that's not vim's bug.

So, that's probably the bug of terminal abstraction layer (if there is one, i don't know) or keyboard mapper or something like that.
Comment 15 Jekyll Wu 2011-08-05 16:22:06 UTC
I can't reproduce the unwanted paste, but I do see the literal O symbol occasionally as intrusted in comment #14.
Comment 16 Jekyll Wu 2011-10-08 07:50:15 UTC
Still can't reproduce the unwanted paste with konsole-2.7.2. Feel free to reopen or leave comment if this still happens in recent version.
Comment 17 Pavel Shved 2011-10-08 19:30:40 UTC
(In reply to comment #16)
> Still can't reproduce the unwanted paste with konsole-2.7.2. Feel free to
> reopen or leave comment if this still happens in recent version.

I still can reproduce it, even with the newest konsole.

Since it's reproduced in many places, as noted in the previous comment, it's not a konsole bug, but still reproducible.
Comment 18 Adrián Chaves (Gallaecio) 2012-09-23 07:16:58 UTC
I cannot reproduce the unwanted paste when entering the INSERT mode and typing random characters fast while holding Shift.

I cannot reproduce the O thing. The “o” character only gets printed when I type so fast that I lost my own synchronization in pressing O and Esc.

Can you still reproduce this with Konsole 2.9.1?
Comment 19 Andrew Crouthamel 2018-09-23 02:27:33 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 20 Andrew Crouthamel 2018-10-27 04:07:32 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!