Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.blahaj.zone
godot·Godotbymaria ~

Changing the script editors text without modifying the undo-redo?

I posted this question on the godot forum, but that has been overrun by bots like crazy, it's all random characters, so probably some AI.

I want to edit the text of the current script editor without modifying the internal undo-redo of the editor.

So essentially I want this to be possible:

  1. User writes some code
  2. Program modifies it, maybe imroving the formatting and such...
  3. Program then reverts to previously written code
  4. User is able to undo their last code addition, without the programmatically inserted stuff to show up as the last undo-step.
Changing the script editors text without modifying the undo-redo?https://forum.godotengine.org/t/how-can-i-get-the-undo-redo-history-of-the-script-editor/88692Open linkView original on lemmy.blahaj.zone
16

1 reply

I haven’t looked into this, but in step 3 can you call the editor’s undo function?

2

You reached the end

Changing the script editors text without modifying the undo-redo? | Spyke