3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { SHOW_OR_FOCUS_HOVER_ACTION_ID } from 'vs/editor/contrib/hover/browser/hoverActionIds' ;
6
+ import { DECREASE_HOVER_VERBOSITY_ACTION_ID , INCREASE_HOVER_VERBOSITY_ACTION_ID , SHOW_OR_FOCUS_HOVER_ACTION_ID } from 'vs/editor/contrib/hover/browser/hoverActionIds' ;
7
7
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent' ;
8
8
import { KeyCode } from 'vs/base/common/keyCodes' ;
9
9
import { Disposable , DisposableStore } from 'vs/base/common/lifecycle' ;
@@ -332,10 +332,12 @@ export class HoverController extends Disposable implements IEditorContribution {
332
332
// If the beginning of a multi-chord keybinding is pressed,
333
333
// or the command aims to focus the hover,
334
334
// set the variable to true, otherwise false
335
- const mightTriggerFocus = (
335
+ const shouldKeepHoverVisible = (
336
336
resolvedKeyboardEvent . kind === ResultKind . MoreChordsNeeded ||
337
337
( resolvedKeyboardEvent . kind === ResultKind . KbFound
338
- && resolvedKeyboardEvent . commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID
338
+ && ( resolvedKeyboardEvent . commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID
339
+ || resolvedKeyboardEvent . commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID
340
+ || resolvedKeyboardEvent . commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID )
339
341
&& this . _contentWidget ?. isVisible
340
342
)
341
343
) ;
@@ -345,7 +347,7 @@ export class HoverController extends Disposable implements IEditorContribution {
345
347
|| e . keyCode === KeyCode . Alt
346
348
|| e . keyCode === KeyCode . Meta
347
349
|| e . keyCode === KeyCode . Shift
348
- || mightTriggerFocus
350
+ || shouldKeepHoverVisible
349
351
) {
350
352
// Do not hide hover when a modifier key is pressed
351
353
return ;
0 commit comments