Source line swapping

I am finding source lines that have been swapped.

if ($item->{foo1} >= 0xFFFF &&
     $item->{foo3} >= 0xFFFF)) {
    ($item->{foo2} > 0xFFFF ||

should be

if ($item->{foo1} >= 0xFFFF &&
    ($item->{foo2} > 0xFFFF ||
    $item->{foo3} >= 0xFFFF)) {

This is happening to me regularly.
It is not even happening where I am editing code.

I have been using Visual Studio for 15 years and am new to Komodo.
If this is not a bug I expect that I am using a key combination from VS.

Has anyone else had this happen?

J.R. Heisey

My first guess would be a keybinding that you may be inadvertently triggering. Look in “Preferences > Key Bindings”, and start with “Editor: Move (Transpose) Line/Selection Up” and “Editor: Move (Transpose) Line/Selection Down” to see what those two entries are bound to…

That or you may be accidentally dragging selections around.

Komodo does not modify your code without a prompt from you, so try to be cognitive of when it happens again and let us know what you were doing. It may be that we need to improve the user experience in some regard.

I figured out that ALT->UP and ALT->DOWN is what moves the current line.
I often use CTRL->UP and CTRL->DOWN to scroll.
I think I did hit this by accident since using ALT does nothing in Visual Studio 2008.

I have disabled the key bindings. :slight_smile: