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.




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



I now move those lines using ALT+UP.



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.



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



I now move the line using ALT+UP.



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.



And now move using ALT+UP.



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

Attachments

  • 1706777760620.png
    9.5 KB · Views: 88

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.
 

Alexander Stolte

Expert
Licensed User
Longtime User
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.
Maybe you should add an example project, because I don't know how you got the same log to go over 2 lines
 

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
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
I can see it happening now: good thing the option is hidden, and I don't use word wrap while coding
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…