Bug? IDE destroys multilines when moving adjacent code using keyboard

Sandman

Expert
Licensed User
Longtime User
The title says it all really, but it might still not be easy to understand so I'll show what I mean.

I found this bug the hard way when I moved some stuff around and the IDE completely trashed code in several places. Thankfully I was able to restore it quickly.



I will first show correct behaviour.

First of all, see how the cursor is at beginning of line 12.


1706777786960.png


I hold shift and press down twice to select two lines.

1706777849690.png


I now move those lines using ALT+UP.

1706777886433.png


This result is perfect in every detail.



I will now show the bug.

I place the cursor at beginning of line 14. Note that line 15 is so long that it wraps. This is important, the bug needs the line below to wrap.

1706778049511.png


I hold shift and press down once to select the line.

1706778124054.png


I now move the line using ALT+UP.

1706778164709.png


The IDE got so confused that it trashed the wrapped line by merging it with the line above.



For completeness.

Here's what happens if I resize the window so the line doesn't wrap. First, line selected.

1706778327610.png


And now move using ALT+UP.

1706778356703.png


Perfect result again. So there's something with wrapped lines that doesn't work.
 

Attachments

  • 1706777760620.png
    1706777760620.png
    9.5 KB · Views: 30

Sandman

Expert
Licensed User
Longtime User
I'm unable to reproduce it...
I don't know what to say about that. I've also verified it in B4J. Could it be that you and me have different settings in our IDEs, and that somehow triggers an edge-case for me that doesn't happen for you? Should I email you my settings file?

Is this issue consistent? Does it happen every time?
Yes, as far as I can tell it happens every time.

Let's ask some more forum members: Can somebody please try to carefully follow my images up top and report back what happens? Make sure the long line is wrapped.
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
My IDE does not wrap lines: a long line just goes out of right side of the screen
 

PaulMeuris

Active Member
Licensed User
I can also reproduce the error.
I have noticed that if you don't select the CRLF character of the line above the wrapped line then the editor behaves normally.
The error in the log is: Invalid number of parentheses..
 
Top