ChangeHistoryService completely does not work, even when enabled

Currently I am making an autocomplete plugin, and one of the things I wanted to do was to bulk-undo auto imports (e.g instead of individually undoing the import definition and autofill, both would be done at once)

However, what I noticed is that ChangeHistoryService.OnUndo does not fire no matter what (even if I undo some random action unrelated to the plugin itself, the undo does work however it does not fire any events)

I also noticed that whenever I try printing :GetCanUndo() to the console, it always prints false even though the undo arrow on the top is white, not gray (which means I CAN undo.)

Note that this behaviour is quite inconsistent… restarting studio seemed to fix it, but after a few minutes of developing it broke again…

I have tried disabling all plugins and then restarting, but again, the same behaviour occurs.

  • System Information
    Intel(R) Celeron(R) N4020 CPU @ 1.10GHz, 4 GB, Intel(R) UHD Graphics 600

  • Beta features:
    Dragger QoL improvements, Studio solid modeling improvements

Expected behavior

.OnUndo should fire when I undo, and :GetCanUndo() should return true along with the latest waypoints when the undo arrow itself is enabled

1 Like