Silverfrost Forums

Welcome to our forums

Undoing Messes Up Code

3 Aug 2017 10:07 #19940

Good evening,

Is anyone else having the problem that code is deleted, scrambled, messed up while undoing in v. 4.75?

3 Aug 2017 10:32 #19941

I just tried to reproduce your problem using Plato 4.75 on a randomly selected Fortran source file. Nothing happened when I changed a few characters scattered over different lines and did 'undo' the requisite number of times. Each time, the 'undo' affected the only characters that had been changed.

Can you make the problem happen in a reproducible way? With any source file? If not, provide specific information.

4 Aug 2017 7:37 #19945

I could not reproduce the problem at will. The next time it happens, I'll try to reproduce it in the file where it occures or at least I'll be able to analyze the circumstances.

9 Aug 2017 12:28 #19975

I'm afraid it's not reproducable on purpose. Sometimes it happens, sometimes it doesn't, without detectable pattern.

Sometimes even asian symbols appear at the current cursor position.

22 Sep 2017 9:39 #20284

I've finally managed to reproduce the error (Plato 4.75):

  1. Create a new .f95-file
  2. Skip 2 lines
  3. In line 3 add ALLOCATE(test(2)) and save
  4. Cut out test(2) using Ctrl+X
  5. In line 1 add ! followed by a tab and some letters (doesn't matter which or how many)
  6. Delete the comment
  7. In line 1 add ALLOCATE(
  8. Paste test(2) using Ctrl+V and close the bracket
  9. Start undoing using Ctrl+Z

Around the 6th undo you should end up with ALLOCATE()test(2) in line 2 or ALLTE in line 1.

[/code]

22 Sep 2017 12:13 #20285

Yes, I can reproduce the error using the steps that you provided.

However, the misplaced text seems to be only in the version that is in the screen display.

If, after you see the malformed line, you save and reopen the file, the line in question can be seen to be unaffected by the bug.

22 Sep 2017 12:17 #20286

viroxa

I have tried this sequence but it works OK for me.

'Skip 2 lines' is not precise so I may be doing something different. Similarly 'Delete the comment' is not precise.

The only other thing is that I am using the latest Plato but I don't think it will make any difference.

You can download the latest Plato using the link here...

https://forums.silverfrost.com/Forum/Topic/3198

22 Sep 2017 1:45 #20290

mecej4, thanks for pointing that out. So far I haven't dared to save after messing everything up.

Paul: 'Skip 2 Lines': Leave lines 1 and 2 blank

'Delete the comment': Either select the whole comment and hit the DEL-key or delete it by using backspace. It's only important, that you remove the comment from line 1 before typing in ALLOCATE( in the same line.

Thanks for providing the link. I'll give it a try.

22 Sep 2017 1:47 #20291

Paul, the error still occurs, I'm afraid.

mecej4, you're right, after closing and reopening, everything's where it's supposed to be.

22 Sep 2017 2:27 #20292

Quoted from PaulLaidler

'Skip 2 lines' is not precise so I may be doing something different. Similarly 'Delete the comment' is not precise.

I had the same reaction as Paul regarding the directions that Viroxa gave.

I had used Plato 4.75 when I was able to reproduce the problem. Just now, I tried Plato 4.81, and it does not display the problem.

Viroxa, you could just replace the version of the Plato editor that you have with the newer version that Paul gave you a link for.

22 Sep 2017 4:51 #20294

I already tried it with the new version, and the problem still occurs. But since it's only a display problem, I can live with it.

25 Sep 2017 11:26 #20308

I can now reproduce the bug and I will make a note that it needs fixing.

25 Sep 2017 1:11 #20309

Thanks!

Please login to reply.