Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Minor datatip fixes #1347

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions modules/atom-ide-ui/pkg/atom-ide-datatip/lib/DatatipManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ class DatatipManagerForEditor {
Observable.fromEvent(this._editorView, 'keydown').subscribe(e => {
const modifierKey = getModifierKeyFromKeyboardEvent(e);
if (modifierKey) {
// On Windows, key repeat applies to modifier keys too!
// So it's quite possible that we hit this twice without hitting keyup.
if (this._heldKeys.has(modifierKey)) {
return;
}
this._heldKeys.add(modifierKey);
if (this._datatipState !== DatatipState.HIDDEN) {
this._fetchInResponseToKeyPress();
Expand Down Expand Up @@ -602,11 +607,13 @@ class DatatipManagerForEditor {
this._datatipState === DatatipState.HIDDEN ||
this._datatipState === DatatipState.FETCHING
) {
this._blacklistedPosition = getBufferPosition(
this._editor,
this._editorView,
this._lastMoveEvent,
);
if (this._blacklistedPosition == null) {
this._blacklistedPosition = getBufferPosition(
this._editor,
this._editorView,
this._lastMoveEvent,
);
}
return;
}

Expand Down