rpfm icon indicating copy to clipboard operation
rpfm copied to clipboard

When editing lua scripts, if you undo too far past your first change then it will remove all contents of the script

Open Volcano467 opened this issue 2 years ago • 3 comments

Hello,

If this has been reported before then I appologize, I looked and did not see it...

When editing a lua script, say you change a few things but then use CTRL+Z to undo. If you undo past your first edit in that session, then it will clear out the entire contents of the script (the screen will turn blank). It would be nice if you could undo up to your first undo, and then nothing else happens in the window.

As far as I can tell, the only thing you can do to get it back is to reload the .pack file.

Thanks!

Volcano467 avatar Apr 02 '23 07:04 Volcano467

As far as I can tell, the only thing you can do to get it back is to reload the .pack file.

ctrl+shift+z is the command for redo, and will "undo" your undo. It's a shortcut that will work in most text editors and other editor programs.

UlrikHD avatar Apr 04 '23 03:04 UlrikHD

Ah, yes, I was trying to do that, but I guess I was pressing ctrl+y (habit from MS Word perhaps).

At least I can do do that to get it back when it happens. Of course it would be nice if it didn't dump the data like this, but ctrl+shift+z helps good enough if fixing that is a PITA. Thanks for the help!

Volcano467 avatar Apr 06 '23 10:04 Volcano467

It's a known issue. AFAIK the only way to fix it is to use a custom version of ktextedit which skips the first undo step when putting the text, which requires C++ knowledge that I lack, and will make redistribution on linux a bit harder.

Frodo45127 avatar Apr 06 '23 17:04 Frodo45127