porcupine icon indicating copy to clipboard operation
porcupine copied to clipboard

undoing to previous save

Open Akuli opened this issue 3 years ago • 3 comments

Sometimes Ctrl+Z undoes more than what was written since the previous time the file was saved. Steps to reproduce:

  1. Make new file (Ctrl+N)
  2. Write asd
  3. Save file
  4. Write lol
  5. Undo (Ctrl+Z)

Expected result: delete only lol.

Actual result: the entire asdlol is deleted.

As mentioned below, the edit_separator() method should probably be called when saving the file.

The relevant code is likely class FileTab in porcupine/tabs.py. There is already a virtual event named <<AfterSave>> , and presumably the edit_separator() call should go into the same place where <<AfterSave>> is emitted.

Akuli avatar Mar 27 '21 11:03 Akuli

Similar to #431

Akuli avatar Jun 03 '21 19:06 Akuli

I would totally use this but have no idea how to implement it

Moosems avatar Aug 17 '22 18:08 Moosems

See edit_separator.

Akuli avatar Aug 17 '22 18:08 Akuli