ElasticTabstops icon indicating copy to clipboard operation
ElasticTabstops copied to clipboard

Redoing paste-format discards redo history

Open nyanpasu64 opened this issue 9 years ago • 3 comments

ST3 32-bit on Windows.

When I redo a "paste" operation, Elastic reformats the pasted text, throwing away all subsequent redo steps. This leads to code loss when stepping through undo history.

EDIT: This may only happen when the initial paste occurred before the plugin finished loading.

nyanpasu64 avatar Jan 17 '16 06:01 nyanpasu64

I can't reproduce this - on my end, redoing a paste works like it should. I don't have a Windows machine to test with, but I don't see why it would be any different. Do you have any other plugins installed? Does it do this every time?

adzenith avatar Jan 18 '16 14:01 adzenith

I discovered a way to reproduce:

Paste in text before the plugin is loaded. Redoing this paste will trigger elastic formatting and discard all future history.

nyanpasu64 avatar Jan 22 '16 09:01 nyanpasu64

Hm... I'm not really sure if there's a way around that. Maybe the plugin could detect an edit to the buffer that doesn't have a subsequent formatting action?

adzenith avatar Feb 27 '18 00:02 adzenith