mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 06:38:23 +00:00
Optimize keydown/up events by only working on !repeat
This commit is contained in:
parent
206d764c6d
commit
5faa26d933
1 changed files with 2 additions and 2 deletions
|
@ -60,12 +60,12 @@ export class TerminalLink extends DisposableStore implements ILink {
|
|||
// Listen for modifier before handing it off to the hover to handle so it gets disposed correctly
|
||||
this._hoverListeners = new DisposableStore();
|
||||
this._hoverListeners.add(dom.addDisposableListener(document, 'keydown', e => {
|
||||
if (this._isModifierDown(e)) {
|
||||
if (!e.repeat && this._isModifierDown(e)) {
|
||||
this._enableDecorations();
|
||||
}
|
||||
}));
|
||||
this._hoverListeners.add(dom.addDisposableListener(document, 'keyup', e => {
|
||||
if (!this._isModifierDown(e)) {
|
||||
if (!e.repeat && !this._isModifierDown(e)) {
|
||||
this._disableDecorations();
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue