Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into nj/fix-codehint-close
Browse files Browse the repository at this point in the history
  • Loading branch information
njx committed Sep 18, 2012
2 parents 19d6a24 + 4379b13 commit 9e18fd8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/editor/CodeHintManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ define(function (require, exports, module) {

var hintProviders = [],
hintList,
shouldShowHintsOnChange = false;
shouldShowHintsOnChange = false,
keyDownEditor;


/**
Expand Down Expand Up @@ -297,6 +298,7 @@ define(function (require, exports, module) {
if (hintList === this) {
hintList = null;
shouldShowHintsOnChange = false;
keyDownEditor = null;
}
};

Expand Down Expand Up @@ -386,6 +388,9 @@ define(function (require, exports, module) {
});

shouldShowHintsOnChange = !!provider;
if (shouldShowHintsOnChange) {
keyDownEditor = editor;
}
}

// Pass to the hint list, if it's open
Expand All @@ -398,8 +403,9 @@ define(function (require, exports, module) {
*
*/
function handleChange(editor) {
if (shouldShowHintsOnChange) {
if (shouldShowHintsOnChange && keyDownEditor === editor) {
shouldShowHintsOnChange = false;
keyDownEditor = null;
showHint(editor);
}
}
Expand Down

0 comments on commit 9e18fd8

Please sign in to comment.