SIGN IN SIGN UP

fix: reorder terminal disposal to prevent xterm addon error (fixes #315722)

Fire _onDisposed before disposing xterm so that contributions clean up
their xterm addons while the raw terminal is still alive. Previously,
xterm was disposed first, which caused AddonManager to remove addons
from its internal list. When contributions subsequently tried to
dispose their own addons, _wrappedAddonDispose could not find them
in the list and threw 'Could not dispose an addon that has not been
loaded'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
V
vs-code-engineering[bot] committed
e62fe6028de3dce91ca15800e1c747da449b2f10
Parent: 7969885
Committed by GitHub <noreply@github.com> on 5/11/2026, 4:36:06 PM