Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: stefanos_ on July 02, 2010, 03:29:52 pm

Title: Possible bug with shift-insert SVN 6378-6379
Post by: stefanos_ on July 02, 2010, 03:29:52 pm
Hello everyone.

Usually when I work with my code, I find shift-insert's usage really convenient. With revision 6378, and currently 6379 though, for some reason it does not work, but control + V works perfectly fine.

Also the same command [shift+ins] works fine with notepad, notepad++, MS-Word 2007, et al.

I use Windows XP Professional [SP3], TDM's GCC 4.5.0

Can anyone test it under Windows XP, Vista, or 7 to see if it's reproducible?

Regards,

stefanos_
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: stefanos_ on July 03, 2010, 10:47:32 pm
OK, right now I have just finished compiling the latest available svn revision (6384) on my Desktop PC and the same bug exist on this one. The original post was discovered on my laptop at work, and I said to myself to give a shot to this current PC.

The previous revision I had installed was the 6370 and shift-insert was working perfectly fine. After that revision, this option does not work at all. Can anyone sort this issue out?

Cheers.

stefanos_
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: oBFusCATed on July 03, 2010, 11:31:24 pm
Works here, gentoo linux amd64,
Tested on:
* debuggers branch - head revision (build with the automake system)
* trunk - one of the latest (build from cb)
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: stefanos_ on July 04, 2010, 06:40:07 pm
Just tested the latest revision (6384) on LinuxMint 9 under VirtualBox with wxGTK-2.8.10 (I don't recall the gcc version, but it's the latest available installed) [on my Desktop PC], and on Fedora 13, with wxGTK-2.8.11 and gcc 4.4.4-2 on my laptop PC.

The issue remains the same, only control+V pastes, shift-insert does not.

VirtualBox LinuxMint 9 specs are 512MB RAM, 8GB HDD.
On laptop PC the specs are 3GB RAM, 120GB HDD, Intel Core Duo 2 2GHz (x86).

Thank you.

stefanos_
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: kisoft on July 05, 2010, 02:39:44 pm
Confirm it. On my WinXPSP2 don't work too. :(
I can't try it on linux.
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: killerbot on July 05, 2010, 02:52:23 pm
I can confirm this too, linux 64 bit OpenSuse 11.2.
Shift + insert works in other applications but not in CB.
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: killerbot on July 05, 2010, 02:55:04 pm
@OP : do you have an idea from which revision on it started failing ?
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: kisoft on July 05, 2010, 03:15:00 pm
rev. 6369 worked fine. 6378 - don't work
DoxyBlocks was added. May be intersect with this keyshorts? (Ctrl-Alt-...)
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: Jenna on July 05, 2010, 03:40:32 pm
rev. 6369 worked fine. 6378 - don't work
DoxyBlocks was added. May be intersect with this keyshorts? (Ctrl-Alt-...)

I don't think so (but not absolutely sure).
@killerbit:
what's about editor tweaks ?
Didn't you commit it the same time ?
If yes it's more likely that the error is there.
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: killerbot on July 05, 2010, 08:02:24 pm
Code
void EditorTweaks::OnKeyPress(wxKeyEvent& event)
{
    if(event.GetKeyCode()==WXK_INSERT)
        event.Skip(false);
    else
        event.Skip(true);
}

Yes, EditorTweaks is the guilty one. will look into this with the original author.
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: dmoore on July 07, 2010, 07:35:56 pm
Code
void EditorTweaks::OnKeyPress(wxKeyEvent& event)
{
    if(event.GetKeyCode()==WXK_INSERT)
        event.Skip(false);
    else
        event.Skip(true);
}

Yes, EditorTweaks is the guilty one. will look into this with the original author.

My fault. I vaguely recall that someone requested disabling of insert key because of some weird keyboard issue. I'll make it optional (and will never block insert with keyboard modifiers).
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: dmoore on July 07, 2010, 07:37:42 pm
Code
void EditorTweaks::OnKeyPress(wxKeyEvent& event)
{
    if(event.GetKeyCode()==WXK_INSERT)
        event.Skip(false);
    else
        event.Skip(true);
}

Yes, EditorTweaks is the guilty one. will look into this with the original author.

btw, it might take a day or so before I get to look at this, so if someone just wants to disable the KeyPress event as a temporary fix, that's ok with me.
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: dmoore on July 09, 2010, 05:34:37 am
A patch is attached -- apply it inside the editor tweaks plugin directory. I am happy to commit this, but would prefer someone to independently check it first.

[attachment deleted by admin]
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: dmoore on July 09, 2010, 05:54:00 am
updated patch (this one correctly disables the "Editor Tweaks" menu if all editors are closed)

[attachment deleted by admin]
Title: Re: Possible bug with shift-insert SVN 6378-6379
Post by: killerbot on July 09, 2010, 10:42:02 am
applied the patch locally, I can confirm it is fixed.
will commit later today ...