mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Avoid recreating duplicate menus and hovers
This commit is contained in:
parent
512145b4b9
commit
508435d60d
|
@ -183,12 +183,13 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
|||
this._placeholderDecoration = decoration;
|
||||
this._placeholderDecoration.onDispose(() => this._placeholderDecoration = undefined);
|
||||
} else {
|
||||
this._decorations.set(decoration.marker.id,
|
||||
{
|
||||
if (!this._decorations.has(decoration.marker.id)) {
|
||||
this._decorations.set(decoration.marker.id, {
|
||||
decoration,
|
||||
disposables: command.exitCode === undefined ? [] : [this._createContextMenu(element, command), ...this._createHover(element, command)],
|
||||
exitCode: command.exitCode
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!element.classList.contains(DecorationSelector.Codicon) || command.marker?.line === 0) {
|
||||
// first render or buffer was cleared
|
||||
|
|
Loading…
Reference in a new issue