masroore / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Corruption of undo/redo #503

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

After writing some code I realized I had accidentally deleted a function, so I 
undid my work to before I deleted that function
I then copied the function and redid everything and pasted the 
recovered function, however the code I had written was jumbled

I'm not sure if it can be reproduced

1. Undo, about 100 operations
2. Copy something
3. Redo all operations

What is the expected output? What do you see instead?

this is one of the affected functions

 Data = list(data)
  sersU= set()
    Data.sort(cmp=lambda a,b:1 if a[FILE] > b[FILE] else -1)
    Start = Container_Find(Data,path,PATH)
    if Data[Start][FILE] != file:
        return []
    End = Start
    while Data[End][PATH].startswith(path):
   sers.add(Data[End][USER])   U
        End += 1
        if (End > len(Data)):break
  sers =Ulist(Users)
  sers.sort() U
  eturn Usersr

as you can see it has mangled several words and has messed up the indentation

What version of the product are you using? On what operating system?
PyScripter 2.4.1
Windows 7 (x64)

Please provide any additional information below.

It believe it is the redo that is messing things up

If redo was to add 'Text typed' it would come out 'ext typedT'
however if it was to add 'Text pasted' it would come out normally

further undoing and redoing act normally
i.e undo will remove 'ext typedT' and redo will add it again

so it might only happen after undoing many times then redoing

Original issue reported on code.google.com by Keogh16...@gmail.com on 10 Apr 2011 at 12:14

GoogleCodeExporter commented 9 years ago
The editor has limit of 1024 undo operations (this could be easily relaxed).  
However in your case this limit was not the issue.  It would help if I had a 
reproducible case, i.e.  a set of undo/redo operations that exhibit the problem.

Did you have the "Tabs to Spaces" option on (recommended)?  

Original comment by pyscripter on 14 Jun 2011 at 11:22