Closed willrowe closed 2 years ago
Is view.settings().get("is_widget", False) and \
necessary?
You can have a terminal in a panel or a full view, so I am not sure if it is trying to only target one of those cases. Either way, greater care needs to be taken when calling clear_undo_stack
to ensure that it is only clearing Terminus views.
Thanks for reporting it. A fix is on the way. I have changed the logic a bit edc4e30. It was meant to be and or
condition.
Fixed in v0.3.21 and it is on the way to Package Control.
I'm not seeing a v0.3.21
, but it looks like v0.3.20
was removed so I uninstalled and reinstalled and v0.3.19
was installed, effectively reverting the breaking code.
Ya, I have removed v0.3.20 as it'll break a lot of people. v0.3.21
should be ready soon from package control. (I forgot to push the tag to github)
Thanks so much @randy3k! I can confirm it is no longer clearing the undo stack on non-Terminus views.
I am sorry about the bug. Shouldn't make a release without testing at the first place.
https://github.com/randy3k/Terminus/blob/fc0b132eae5a1118081bd97d167f53aa3c2c477f/terminus/commands.py#L489-L497
Due to this code, the undo stack in non-Terminus views will be randomly cleared. The conditional at the top is hard to parse initially, but it seems that the rest of the code in this method will only run if:
This means that any non-widget view will have its undo stack cleared.