Hide terminal tab hover on mousein, unless actions

Fixes #122299
This commit is contained in:
Daniel Imms 2021-04-27 04:47:41 -07:00
parent eb141a8025
commit dbb1a58499
2 changed files with 10 additions and 9 deletions

View file

@ -185,7 +185,8 @@ class TerminalTabsRenderer implements ITreeRenderer<ITerminalInstance, never, IT
showHover: options => {
return this._hoverService.showHover({
...options,
actions: context.hoverActions
actions: context.hoverActions,
hideOnHover: true
});
}
}

View file

@ -143,17 +143,17 @@ export class HoverWidget extends Widget {
const mouseTrackerTargets = [...this._target.targetElements];
let hideOnHover: boolean;
if (options.hideOnHover === undefined) {
if (options.actions && options.actions.length > 0) {
// If there are actions, require hover so they can be accessed
hideOnHover = false;
} else {
if (options.actions && options.actions.length > 0) {
// If there are actions, require hover so they can be accessed
hideOnHover = false;
} else {
if (options.hideOnHover === undefined) {
// Defaults to true when string, false when markdown as it may contain links
hideOnHover = typeof options.text === 'string';
} else {
// It's set explicitly
hideOnHover = options.hideOnHover;
}
} else {
// It's set explicitly
hideOnHover = options.hideOnHover;
}
if (!hideOnHover) {
mouseTrackerTargets.push(this._hover.containerDomNode);